org.apache.maven.model.Profile.getSource()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中org.apache.maven.model.Profile.getSource()方法的一些代码示例,展示了Profile.getSource()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Profile.getSource()方法的具体详情如下:
包路径:org.apache.maven.model.Profile
类名称:Profile
方法名:getSource

Profile.getSource介绍

暂无

代码示例

代码示例来源:origin: apache/maven

/**
 * @see java.lang.Object#toString()
 */
public String toString()
{
  return "Profile {id: " + getId() + ", source: " + getSource() + "}";
}

代码示例来源:origin: org.apache.maven/maven-project

if ( "pom".equals( profile.getSource() ) )

代码示例来源:origin: apache/maven

public void addProfile( Profile profile )
{
  String profileId = profile.getId();
  Profile existing = profilesById.get( profileId );
  if ( existing != null )
  {
    logger.warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource()
      + ") with new instance from source: " + profile.getSource() );
  }
  profilesById.put( profile.getId(), profile );
  Activation activation = profile.getActivation();
  if ( activation != null && activation.isActiveByDefault() )
  {
    activateAsDefault( profileId );
  }
}

代码示例来源:origin: apache/maven

if ( Profile.SOURCE_POM.equals( profile.getSource() ) )
if ( Profile.SOURCE_POM.equals( profile.getSource() ) )

代码示例来源:origin: org.apache.maven/maven-project

public void addProfile( Profile profile )
{
  String profileId = profile.getId();
  Profile existing = (Profile) profilesById.get( profileId );
  if ( existing != null )
  {
    container.getLogger().warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource() +
      ") with new instance from source: " + profile.getSource() );
  }
  profilesById.put( profile.getId(), profile );
  Activation activation = profile.getActivation();
  if ( activation != null && activation.isActiveByDefault() )
  {
    activateAsDefault( profileId );
  }
}

代码示例来源:origin: org.apache.maven/maven-project

public static Profile cloneProfile( Profile src )
{
  if ( src == null )
  {
    return null;
  }
  
  Profile result = new Profile();
  
  cloneModelBaseFields( src, result );
  
  result.setActivation( cloneActivation( src.getActivation() ) );
  
  BuildBase resultBuild = null;
  if ( src.getBuild() != null )
  {
    resultBuild = new BuildBase();
    cloneBuildBaseFields( src.getBuild(), resultBuild );
  }
  result.setBuild( resultBuild );
  
  result.setId( src.getId() );
  result.setSource( src.getSource() );
  
  return result;
}

代码示例来源:origin: io.tesla.maven/maven-model

/**
 * @see java.lang.Object#toString()
 */
public String toString()
{
  return "Profile {id: " + getId() + ", source: " + getSource() + "}";
}

代码示例来源:origin: org.apache.continuum/continuum-core

private void writeActiveProfileStatement( MavenProject project )
{
  List<Profile> profiles = project.getActiveProfiles();
  StringBuffer message = new StringBuffer();
  message.append( "\n" );
  message.append( "\n************************************************************************************" );
  message.append( "\nActive Profiles for Project \'" ).append( project.getId() ).append( "\'" );
  message.append( "\n************************************************************************************" );
  message.append( "\n" );
  if ( profiles == null || profiles.isEmpty() )
  {
    message.append( "There are no active profiles." );
  }
  else
  {
    message.append( "The following profiles are active:\n" );
    for ( Profile profile : profiles )
    {
      message.append( "\n - " ).append( profile.getId() ).append( " (source: " ).append(
        profile.getSource() ).append( ")" );
    }
  }
  message.append( "\n************************************************************************************" );
  message.append( "\n\n" );
  log.debug( message.toString() );
}

代码示例来源:origin: org.apache.continuum/continuum-buildagent-core

private void writeActiveProfileStatement( MavenProject project )
{
  List<Profile> profiles = project.getActiveProfiles();
  StringBuffer message = new StringBuffer();
  message.append( "\n" );
  message.append( "\n************************************************************************************" );
  message.append( "\nActive Profiles for Project \'" ).append( project.getId() ).append( "\'" );
  message.append( "\n************************************************************************************" );
  message.append( "\n" );
  if ( profiles == null || profiles.isEmpty() )
  {
    message.append( "There are no active profiles." );
  }
  else
  {
    message.append( "The following profiles are active:\n" );
    for ( Profile profile : profiles )
    {
      message.append( "\n - " ).append( profile.getId() ).append( " (source: " ).append(
        profile.getSource() ).append( ")" );
    }
  }
  message.append( "\n************************************************************************************" );
  message.append( "\n\n" );
  log.debug( message.toString() );
}

代码示例来源:origin: org.apache.maven.continuum/continuum-core

private void writeActiveProfileStatement( MavenProject project )
{
  List profiles = project.getActiveProfiles();
  StringBuffer message = new StringBuffer();
  message.append( "\n" );
  message.append( "\n************************************************************************************" );
  message.append( "\nActive Profiles for Project \'" ).append( project.getId() ).append( "\'" );
  message.append( "\n************************************************************************************" );
  message.append( "\n" );
  if ( profiles == null || profiles.isEmpty() )
  {
    message.append( "There are no active profiles." );
  }
  else
  {
    message.append( "The following profiles are active:\n" );
    for ( Iterator it = profiles.iterator(); it.hasNext(); )
    {
      Profile profile = (Profile) it.next();
      message.append( "\n - " ).append( profile.getId() ).append( " (source: " )
        .append( profile.getSource() ).append( ")" );
    }
  }
  message.append( "\n************************************************************************************" );
  message.append( "\n\n" );
  getLogger().debug( message.toString() );
}

代码示例来源:origin: org.apache.maven/maven-model-builder

if ( Profile.SOURCE_POM.equals( profile.getSource() ) )
if ( Profile.SOURCE_POM.equals( profile.getSource() ) )

相关文章