use of org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration in project build-info by JFrogDev.
the class ResolutionHelper method init.
public void init(Properties allMavenProps) {
if (internalConfiguration != null) {
return;
}
Maven3BuildInfoLogger log = new Maven3BuildInfoLogger(logger);
Properties allProps = BuildInfoExtractorUtils.mergePropertiesWithSystemAndPropertyFile(allMavenProps, log);
internalConfiguration = new ArtifactoryClientConfiguration(log);
internalConfiguration.fillFromProperties(allProps);
initialized = true;
}
use of org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration in project build-info by JFrogDev.
the class BuildInfoRecorderLifecycleParticipant method getConfiguration.
private ArtifactoryClientConfiguration getConfiguration(MavenSession session) {
if (internalConfiguration != null) {
return internalConfiguration;
}
Properties allMavenProps = new Properties();
allMavenProps.putAll(session.getSystemProperties());
allMavenProps.putAll(session.getUserProperties());
Maven3BuildInfoLogger log = new Maven3BuildInfoLogger(logger);
Properties allProps = BuildInfoExtractorUtils.mergePropertiesWithSystemAndPropertyFile(allMavenProps, log);
internalConfiguration = new ArtifactoryClientConfiguration(log);
internalConfiguration.fillFromProperties(allProps);
return internalConfiguration;
}
use of org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration in project build-info by JFrogDev.
the class ArtifactoryBuildListener method assertInitialized.
private void assertInitialized(BuildEvent event) {
if (buildInfoLog != null) {
buildInfoLog.setProject(event.getProject());
return;
}
try {
buildInfoLog = new IvyBuildInfoLog(event.getProject());
ArtifactoryClientConfiguration clientConf = new ArtifactoryClientConfiguration(buildInfoLog);
Properties props = getMergedEnvAndSystemProps();
clientConf.fillFromProperties(props);
ctx = new BuildContext(clientConf);
DEPENDENCY_TRIGGER.setIvyBuildContext(ctx);
PUBLISH_TRIGGER.setIvyBuildContext(ctx);
buildInfoLog.info("[buildinfo:ant] Artifactory Build Info Listener Initialized");
} catch (Exception e) {
RuntimeException re = new RuntimeException("Fail to initialize the Ivy listeners for the Artifactory Ivy plugin, due to: " + e.getMessage(), e);
if (buildInfoLog != null && buildInfoLog.getProject() != null) {
buildInfoLog.error(re.getMessage(), e);
}
throw re;
}
}
Aggregations