use of org.jfrog.build.api.builder.ModuleBuilder in project build-info by JFrogDev.
the class BuildInfoRecorder method addFilesToCurrentModule.
private void addFilesToCurrentModule(MavenProject project) {
ModuleBuilder module = currentModule.get();
if (module == null) {
logger.warn("Skipping Artifactory Build-Info module finalization: Null current module.");
return;
}
addArtifactsToCurrentModule(project, module);
addDependenciesToCurrentModule(module);
buildInfoBuilder.addModule(module.build());
}
use of org.jfrog.build.api.builder.ModuleBuilder in project build-info by JFrogDev.
the class BuildInfoRecorder method initModule.
private void initModule(MavenProject project) {
if (project == null) {
logger.warn("Skipping Artifactory Build-Info module initialization: Null project.");
return;
}
ModuleBuilder module = new ModuleBuilder();
module.id(getModuleIdString(project.getGroupId(), project.getArtifactId(), project.getVersion()));
module.properties(project.getProperties());
currentModule.set(module);
currentModuleArtifacts.set(Collections.synchronizedSet(new HashSet<Artifact>()));
currentModuleDependencies.set(Collections.synchronizedSet(new HashSet<Artifact>()));
}
use of org.jfrog.build.api.builder.ModuleBuilder in project build-info by JFrogDev.
the class ArtifactoryBuildInfoTrigger method getOrCreateModule.
private Module getOrCreateModule(Map<String, String> attributes) {
List<Module> modules = ctx.getModules();
final String org = attributes.get("organisation");
final String moduleName = attributes.get("module");
String moduleKey = getModuleIdString(org, moduleName, "");
String moduleId = getModuleIdString(org, moduleName, attributes.get("revision"));
Module module = findModule(modules, moduleKey);
if (module == null) {
ModuleBuilder moduleBuilder = new ModuleBuilder().id(moduleId);
module = moduleBuilder.build();
modules.add(module);
} else {
module.setId(moduleId);
}
return module;
}
Aggregations