当前位置: 首页>>代码示例>>Java>>正文


Java PluginExecution.getGoals方法代码示例

本文整理汇总了Java中org.apache.maven.model.PluginExecution.getGoals方法的典型用法代码示例。如果您正苦于以下问题:Java PluginExecution.getGoals方法的具体用法?Java PluginExecution.getGoals怎么用?Java PluginExecution.getGoals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.model.PluginExecution的用法示例。


在下文中一共展示了PluginExecution.getGoals方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visitBuildPluginExecution

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
private void visitBuildPluginExecution( ModelVisitor visitor, PluginExecution pluginExecution )
{
    List<String> goals = pluginExecution.getGoals();
    if ( goals != null )
    {
        ListIterator<String> goalIterator = goals.listIterator();
        while ( goalIterator.hasNext() )
        {
            String goal = goalIterator.next();
            visitor.visitBuildPluginExecutionGoal( goal );
            goal = visitor.replaceBuildPluginExecutionGoal( goal );
            if ( goal == null )
                goalIterator.remove();
            else
                goalIterator.set( goal );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:19,代码来源:DefaultModelProcessor.java

示例2: visitBuildPluginManagementPluginExecution

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
private void visitBuildPluginManagementPluginExecution( ModelVisitor visitor, PluginExecution pluginExecution )
{
    List<String> goals = pluginExecution.getGoals();
    if ( goals != null )
    {
        ListIterator<String> goalIterator = goals.listIterator();
        while ( goalIterator.hasNext() )
        {
            String goal = goalIterator.next();
            visitor.visitBuildPluginManagementPluginExecutionGoal( goal );
            goal = visitor.replaceBuildPluginManagementPluginExecutionGoal( goal );
            if ( goal == null )
                goalIterator.remove();
            else
                goalIterator.set( goal );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:19,代码来源:DefaultModelProcessor.java

示例3: visitProfileBuildPluginExecution

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
private void visitProfileBuildPluginExecution( ModelVisitor visitor, PluginExecution pluginExecution )
{
    List<String> goals = pluginExecution.getGoals();
    if ( goals != null )
    {
        ListIterator<String> goalIterator = goals.listIterator();
        while ( goalIterator.hasNext() )
        {
            String goal = goalIterator.next();
            visitor.visitProfileBuildPluginExecutionGoal( goal );
            goal = visitor.replaceProfileBuildPluginExecutionGoal( goal );
            if ( goal == null )
                goalIterator.remove();
            else
                goalIterator.set( goal );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:19,代码来源:DefaultModelProcessor.java

示例4: visitProfileBuildPluginManagementPluginExecution

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
private void visitProfileBuildPluginManagementPluginExecution( ModelVisitor visitor,
                                                               PluginExecution pluginExecution )
{
    List<String> goals = pluginExecution.getGoals();
    if ( goals != null )
    {
        ListIterator<String> goalIterator = goals.listIterator();
        while ( goalIterator.hasNext() )
        {
            String goal = goalIterator.next();
            visitor.visitProfileBuildPluginManagementPluginExecutionGoal( goal );
            goal = visitor.replaceProfileBuildPluginManagementPluginExecutionGoal( goal );
            if ( goal == null )
                goalIterator.remove();
            else
                goalIterator.set( goal );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:20,代码来源:DefaultModelProcessor.java

示例5: mergePluginExecution_Goals

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
@Override
protected void mergePluginExecution_Goals( PluginExecution target, PluginExecution source, boolean sourceDominant,
                                           Map<Object, Object> context )
{
    List<String> src = source.getGoals();
    if ( !src.isEmpty() )
    {
        List<String> tgt = target.getGoals();
        Set<String> excludes = new LinkedHashSet<String>( tgt );
        List<String> merged = new ArrayList<String>( tgt.size() + src.size() );
        merged.addAll( tgt );
        for ( String s : src )
        {
            if ( !excludes.contains( s ) )
            {
                merged.add( s );
            }
        }
        target.setGoals( merged );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:22,代码来源:MavenModelMerger.java

示例6: writePluginExecution

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
private void writePluginExecution(PluginExecution pluginExecution, String tagName, XmlSerializer serializer)
        throws java.io.IOException {
    serializer.startTag(NAMESPACE, tagName);
    flush(serializer);
    StringBuffer b = b(serializer);
    int start = b.length();
    if ((pluginExecution.getId() != null) && !pluginExecution.getId().equals("default")) {
        writeValue(serializer, "id", pluginExecution.getId(), pluginExecution);
    }
    if (pluginExecution.getPhase() != null) {
        writeValue(serializer, "phase", pluginExecution.getPhase(), pluginExecution);
    }
    if ((pluginExecution.getGoals() != null) && (pluginExecution.getGoals().size() > 0)) {
        serializer.startTag(NAMESPACE, "goals");
        flush(serializer);
        int start2 = b.length();
        int index = 0;
        InputLocation tracker = pluginExecution.getLocation("goals");

        for (Iterator iter = pluginExecution.getGoals().iterator(); iter.hasNext();) {
            String goal = (String) iter.next();
            writeValue(serializer, "goal", goal, tracker, index);
            index = index + 1;
        }
        serializer.endTag(NAMESPACE, "goals").flush();
        logLocation(pluginExecution, "goals", start2, b.length());
    }
    if (pluginExecution.getInherited() != null) {
        writeValue(serializer, "inherited", pluginExecution.getInherited(), pluginExecution);
    }
    if (pluginExecution.getConfiguration() != null) {
        writeXpp3DOM(serializer, (Xpp3Dom)pluginExecution.getConfiguration(), pluginExecution);
    }
    serializer.endTag(NAMESPACE, tagName).flush();
    logLocation(pluginExecution, "", start, b.length());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:37,代码来源:LocationAwareMavenXpp3Writer.java

示例7: mergePluginExecutionDefinitions

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
private static void mergePluginExecutionDefinitions( PluginExecution child, PluginExecution parent )
{
    if ( child.getPhase() == null )
    {
        child.setPhase( parent.getPhase() );
    }

    List<String> parentGoals = parent.getGoals();
    List<String> childGoals = child.getGoals();

    List<String> goals = new ArrayList<String>();

    if ( ( childGoals != null ) && !childGoals.isEmpty() )
    {
        goals.addAll( childGoals );
    }

    if ( parentGoals != null )
    {
        for (  String goal : parentGoals )
        {
            if ( !goals.contains( goal ) )
            {
                goals.add( goal );
            }
        }
    }

    child.setGoals( goals );

    Xpp3Dom childConfiguration = (Xpp3Dom) child.getConfiguration();
    Xpp3Dom parentConfiguration = (Xpp3Dom) parent.getConfiguration();

    childConfiguration = Xpp3Dom.mergeXpp3Dom( childConfiguration, parentConfiguration );

    child.setConfiguration( childConfiguration );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:38,代码来源:ModelUtils.java

示例8: mergePluginExecution_Goals

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
protected void mergePluginExecution_Goals( PluginExecution target, PluginExecution source, boolean sourceDominant,
                                           Map<Object, Object> context )
{
    List<String> src = source.getGoals();
    if ( !src.isEmpty() )
    {
        List<String> tgt = target.getGoals();
        List<String> merged = new ArrayList<String>( tgt.size() + src.size() );
        merged.addAll( tgt );
        merged.addAll( src );
        target.setGoals( merged );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java

示例9: convertExecution

import org.apache.maven.model.PluginExecution; //导入方法依赖的package包/类
private static MavenPluginExecution convertExecution(PluginExecution execution) {
  return new MavenPluginExecution(
      execution.getId(),
      convertConfiguration(execution.getConfiguration()),
      execution.getGoals());
}
 
开发者ID:eclipse,项目名称:che,代码行数:7,代码来源:MavenModelUtil.java


注:本文中的org.apache.maven.model.PluginExecution.getGoals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。