本文整理汇总了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 );
}
}
}
示例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 );
}
}
}
示例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 );
}
}
}
示例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 );
}
}
}
示例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 );
}
}
示例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());
}
示例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 );
}
示例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 );
}
}
示例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());
}