本文整理了Java中org.apache.maven.settings.Profile.getId()
方法的一些代码示例,展示了Profile.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Profile.getId()
方法的具体详情如下:
包路径:org.apache.maven.settings.Profile
类名称:Profile
方法名:getId
暂无
代码示例来源:origin: apache/maven
/**
* @return a Map of profiles field with <code>Profile#getId()</code> as key
* @see org.apache.maven.settings.Profile#getId()
*/
public java.util.Map<String, Profile> getProfilesAsMap()
{
if ( profileMap == null )
{
profileMap = new java.util.LinkedHashMap<String, Profile>();
if ( getProfiles() != null )
{
for ( Profile profile : getProfiles() )
{
profileMap.put( profile.getId(), profile );
}
}
}
return profileMap;
}
代码示例来源:origin: apache/maven
if ( ( profile.getId() != null ) && !profile.getId().equals( "default" ) )
serializer.startTag( NAMESPACE, "id" ).text( profile.getId() ).endTag( NAMESPACE, "id" );
代码示例来源:origin: apache/maven
if ( !profileIds.add( profile.getId() ) )
"must be unique but found duplicate profile with id " + profile.getId() );
String prefix = "profiles.profile[" + profile.getId() + "].";
代码示例来源:origin: apache/maven
if ( settings.getActiveProfiles().contains( rawProfile.getId() ) )
代码示例来源:origin: org.apache.maven/maven-settings
/**
* @return a Map of profiles field with <code>Profile#getId()</code> as key
* @see org.apache.maven.settings.Profile#getId()
*/
public java.util.Map<String, Profile> getProfilesAsMap()
{
if ( profileMap == null )
{
profileMap = new java.util.LinkedHashMap<String, Profile>();
if ( getProfiles() != null )
{
for ( Profile profile : getProfiles() )
{
profileMap.put( profile.getId(), profile );
}
}
}
return profileMap;
}
代码示例来源:origin: apache/maven
if ( settings.getActiveProfiles().contains( rawProfile.getId() ) )
代码示例来源:origin: apache/maven
profile.setId( settingsProfile.getId() );
代码示例来源:origin: org.apache.maven/maven-settings
if ( ( profile.getId() != null ) && !profile.getId().equals( "default" ) )
serializer.startTag( NAMESPACE, "id" ).text( profile.getId() ).endTag( NAMESPACE, "id" );
代码示例来源:origin: org.eclipse.hudson.main/maven3-eventspy-3.0
private static void logSettingsProfileList( List<org.apache.maven.settings.Profile> profiles, String type )
{
log.debug( String.format( "%s %s profiles.", type, profiles.size() ) );
for ( org.apache.maven.settings.Profile profile : profiles )
{
log.debug( " {}", String.format("Profile {id: %s, source: %s}", profile.getId(), profile.getSourceLevel() ) );
}
}
}
代码示例来源:origin: org.hudsonci.plugins/maven3-eventspy-3.1
private static void logSettingsProfileList( List<org.apache.maven.settings.Profile> profiles, String type )
{
log.debug( String.format( "%s %s profiles.", type, profiles.size() ) );
for ( org.apache.maven.settings.Profile profile : profiles )
{
log.debug( " {}", String.format("Profile {id: %s, source: %s}", profile.getId(), profile.getSourceLevel() ) );
}
}
}
代码示例来源:origin: org.jvnet.hudson.main/maven3-eventspy-3.0
private static void logSettingsProfileList( List<org.apache.maven.settings.Profile> profiles, String type )
{
log.debug( String.format( "%s %s profiles.", type, profiles.size() ) );
for ( org.apache.maven.settings.Profile profile : profiles )
{
log.debug( " {}", String.format("Profile {id: %s, source: %s}", profile.getId(), profile.getSourceLevel() ) );
}
}
}
代码示例来源:origin: ru.yandex.qatools.clay/clay-maven-settings-builder
protected FluentSettingsBuilder withActiveProfile(Profile profile) {
settings.addProfile(profile);
settings.addActiveProfile(profile.getId());
return this;
}
代码示例来源:origin: org.uberfire/uberfire-maven-integration
private boolean isProfileActive( Profile profile ) {
return settings.getActiveProfiles().contains( profile.getId() ) ||
( profile.getActivation() != null && profile.getActivation().isActiveByDefault() );
}
代码示例来源:origin: org.kie.soup/kie-soup-maven-integration
private boolean isProfileActive( Profile profile ) {
return settings.getActiveProfiles().contains( profile.getId() ) ||
( profile.getActivation() != null && profile.getActivation().isActiveByDefault() );
}
代码示例来源:origin: spring-projects/sts4
private List<Profile> getActiveProfiles() throws MavenException {
Settings settings = getSettings();
List<String> activeProfilesIds = settings.getActiveProfiles();
ArrayList<Profile> activeProfiles = new ArrayList<Profile>();
for (org.apache.maven.settings.Profile settingsProfile : settings.getProfiles()) {
if ((settingsProfile.getActivation() != null && settingsProfile.getActivation().isActiveByDefault())
|| activeProfilesIds.contains(settingsProfile.getId())) {
Profile profile = SettingsUtils.convertFromSettingsProfile(settingsProfile);
activeProfiles.add(profile);
}
}
return activeProfiles;
}
代码示例来源:origin: org.springframework.boot/spring-boot-cli
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;
}
代码示例来源:origin: spring-cloud/spring-cloud-function
private List<org.apache.maven.model.Profile> createModelProfiles(
List<Profile> profiles) {
List<org.apache.maven.model.Profile> modelProfiles = new ArrayList<org.apache.maven.model.Profile>();
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;
}
代码示例来源:origin: org.jboss.forge.addon/maven-api
public ProfileAdapter(final org.apache.maven.settings.Profile profile)
{
setId(profile.getId());
Activation activation = new Activation();
setActivation(activation);
for (org.apache.maven.settings.Repository repository : profile.getRepositories())
{
Repository mavenRepository = new Repository();
mavenRepository.setId(repository.getId());
mavenRepository.setUrl(repository.getUrl());
getRepositories().add(mavenRepository);
}
setProperties(profile.getProperties());
}
代码示例来源:origin: org.jboss.shrinkwrap.resolver/shrinkwrap-resolver-impl-maven
public static Profile asProfile(org.apache.maven.settings.Profile profile) {
Profile mavenProfile = new Profile();
if (profile != null) {
mavenProfile.setId(profile.getId());
mavenProfile.setActivation(asActivation(profile.getActivation()));
mavenProfile.setProperties(profile.getProperties());
mavenProfile.setRepositories(asRepositories(profile.getRepositories()));
mavenProfile.setPluginRepositories(asRepositories(profile.getPluginRepositories()));
}
return mavenProfile;
}
代码示例来源:origin: shrinkwrap/resolver
public static Profile asProfile(org.apache.maven.settings.Profile profile) {
Profile mavenProfile = new Profile();
if (profile != null) {
mavenProfile.setId(profile.getId());
mavenProfile.setActivation(asActivation(profile.getActivation()));
mavenProfile.setProperties(profile.getProperties());
mavenProfile.setRepositories(asRepositories(profile.getRepositories()));
mavenProfile.setPluginRepositories(asRepositories(profile.getPluginRepositories()));
}
return mavenProfile;
}
内容来源于网络,如有侵权,请联系作者删除!