use of org.apache.maven.settings.Profile in project spring-boot by spring-projects.
the class MavenSettings method createModelProfiles.
private List<org.apache.maven.model.Profile> createModelProfiles(List<Profile> profiles) {
List<org.apache.maven.model.Profile> modelProfiles = new ArrayList<>();
for (Profile profile : profiles) {
org.apache.maven.model.Profile modelProfile = new org.apache.maven.model.Profile();
modelProfile.setId(profile.getId());
if (profile.getActivation() != null) {
modelProfile.setActivation(createModelActivation(profile.getActivation()));
}
modelProfiles.add(modelProfile);
}
return modelProfiles;
}
use of org.apache.maven.settings.Profile in project spring-boot by spring-projects.
the class RepositoryConfigurationFactory method addActiveProfileRepositories.
private static void addActiveProfileRepositories(List<Profile> activeProfiles, List<RepositoryConfiguration> configurations) {
for (Profile activeProfile : activeProfiles) {
Interpolator interpolator = new RegexBasedInterpolator();
interpolator.addValueSource(new PropertiesBasedValueSource(activeProfile.getProperties()));
for (Repository repository : activeProfile.getRepositories()) {
configurations.add(getRepositoryConfiguration(interpolator, repository));
}
}
}
use of org.apache.maven.settings.Profile in project maven-plugins by apache.
the class SettingsSitePublishVariableStub method getProfiles.
@Override
public List<Profile> getProfiles() {
Profile p = new Profile();
p.setId("site-location");
p.addProperty("sitePublishLocation", "file://tmp/sitePublish");
return Collections.singletonList(p);
}
use of org.apache.maven.settings.Profile in project maven-plugins by apache.
the class EffectiveSettingsMojo method cleanSettings.
/**
* Apply some logic to clean the model before writing it.
*
* @param settings not null
*/
private static void cleanSettings(Settings settings) {
List<Profile> profiles = settings.getProfiles();
for (Profile profile : profiles) {
Properties properties = new SortedProperties();
properties.putAll(profile.getProperties());
profile.setProperties(properties);
}
}
Aggregations