use of org.jreleaser.util.JReleaserLogger in project jreleaser by jreleaser.
the class AbstractJReleaserMojo method createContext.
protected JReleaserContext createContext() throws MojoExecutionException {
try {
if (isQuiet()) {
System.setProperty(JRELEASER_QUIET, "true");
}
JReleaserLogger logger = getLogger();
PlatformUtils.resolveCurrentPlatform(logger);
Path basedir = resolveBasedir();
logger.info("JReleaser {}", JReleaserVersion.getPlainVersion());
JReleaserVersion.banner(logger.getTracer());
if (null != configFile) {
logger.info("Configuring with {}", configFile.getAbsolutePath());
}
logger.increaseIndent();
logger.info("- basedir set to {}", basedir.toAbsolutePath());
logger.decreaseIndent();
return ContextCreator.create(logger, resolveConfigurer(configFile), getMode(), null == configFile ? convertModel() : readModel(logger), basedir, outputDirectory.toPath(), dryrun, gitRootSearch, collectSelectedPlatforms());
} catch (JReleaserException e) {
throw new MojoExecutionException("JReleaser for project " + project.getArtifactId() + " has not been properly configured.", e);
}
}
use of org.jreleaser.util.JReleaserLogger in project jreleaser by jreleaser.
the class ClientUtils method builder.
public static Feign.Builder builder(JReleaserLogger logger, int connectTimeout, int readTimeout) {
requireNonNull(logger, "'logger' must not be null");
Feign.Builder builder = Feign.builder();
if (Boolean.getBoolean("jreleaser.disableSslValidation")) {
logger.warn(RB.$("warn_ssl_disabled"));
builder = builder.client(new Client.Default(nonValidatingSSLSocketFactory(), new NonValidatingHostnameVerifier()));
}
return builder.encoder(new FormEncoder(new JacksonEncoder())).decoder(new JacksonDecoder()).requestInterceptor(template -> template.header("User-Agent", "JReleaser/" + JReleaserVersion.getPlainVersion())).errorDecoder((methodKey, response) -> new RestAPIException(response.request(), response.status(), response.reason(), response.headers())).options(new Request.Options(connectTimeout, TimeUnit.SECONDS, readTimeout, TimeUnit.SECONDS, true));
}
Aggregations