use of org.eclipse.che.maven.data.MavenProfile in project che by eclipse.
the class MavenModelUtil method convertProfiles.
private static List<MavenProfile> convertProfiles(List<Profile> profiles) {
List<MavenProfile> result = new ArrayList<>();
if (profiles != null) {
for (Profile profile : profiles) {
if (profile.getId() == null) {
continue;
}
MavenProfile mavenProfile = new MavenProfile(profile.getId(), profile.getSource());
List<String> modules = profile.getModules();
if (modules == null) {
mavenProfile.setModules(Collections.emptyList());
} else {
mavenProfile.setModules(modules);
}
mavenProfile.setActivation(convertActivation(profile.getActivation()));
if (profile.getBuild() != null) {
convertBaseBuild(profile.getBuild(), mavenProfile.getBuild());
}
result.add(mavenProfile);
}
}
return result;
}
use of org.eclipse.che.maven.data.MavenProfile in project che by eclipse.
the class MavenModelUtil method convertToMavenProfile.
private static Profile convertToMavenProfile(MavenProfile mavenProfile) {
Profile result = new Profile();
result.setId(mavenProfile.getId());
result.setSource(mavenProfile.getSource());
result.setModules(mavenProfile.getModules());
result.setProperties(mavenProfile.getProperties());
result.setBuild(new Build());
result.setActivation(convertToMavenActivation(mavenProfile.getActivation()));
convertToMavenBuildBase(mavenProfile.getBuild(), result.getBuild());
return result;
}
Aggregations