You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/05/06 04:17:41 UTC
svn commit: r168492 -
/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/jelly/JellyHarnessGenerator.java
Author: brett
Date: Thu May 5 19:17:39 2005
New Revision: 168492
URL: http://svn.apache.org/viewcvs?rev=168492&view=rev
Log:
write the plugin file, not the project file
Modified:
maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/jelly/JellyHarnessGenerator.java
Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/jelly/JellyHarnessGenerator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/jelly/JellyHarnessGenerator.java?rev=168492&r1=168491&r2=168492&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/jelly/JellyHarnessGenerator.java (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/jelly/JellyHarnessGenerator.java Thu May 5 19:17:39 2005
@@ -1,7 +1,7 @@
package org.apache.maven.tools.plugin.generator.jelly;
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.plugin.descriptor.Parameter;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.apache.maven.project.MavenProject;
import org.apache.maven.tools.plugin.generator.Generator;
import org.apache.maven.tools.plugin.util.PluginUtils;
import org.codehaus.plexus.util.IOUtil;
@@ -32,7 +31,6 @@
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
-import java.util.Set;
/**
* @todo use the descriptions in the descriptor for the javadoc pushed into the
@@ -61,7 +59,7 @@
w = new PrettyPrintXMLWriter( writer );
- writeProjectFile( w, pluginDescriptor );
+ writePluginFile( w, pluginDescriptor );
writer.flush();
}
@@ -91,7 +89,7 @@
}
}
- private void writePluginFile( PrettyPrintXMLWriter w, String goalPrefix, Set mojoDescriptors, MavenProject project )
+ private void writePluginFile( PrettyPrintXMLWriter w, PluginDescriptor pluginDescriptor )
{
w.startElement( "project" );
@@ -99,7 +97,7 @@
w.addAttribute( "xmlns:d", "jelly:define" );
- w.addAttribute( "xmlns:" + goalPrefix, goalPrefix );
+ w.addAttribute( "xmlns:" + pluginDescriptor.getGoalPrefix(), pluginDescriptor.getGoalPrefix() );
// ----------------------------------------------------------------------
//
@@ -107,12 +105,12 @@
w.startElement( "d:taglib" );
- w.addAttribute( "uri", goalPrefix );
+ w.addAttribute( "uri", pluginDescriptor.getGoalPrefix() );
- for ( Iterator it = mojoDescriptors.iterator(); it.hasNext(); )
+ for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); )
{
MojoDescriptor descriptor = (MojoDescriptor) it.next();
- processPluginDescriptor( descriptor, w, project );
+ processMojoDescriptor( descriptor, w );
}
w.endElement();
@@ -121,7 +119,7 @@
//
// ----------------------------------------------------------------------
- for ( Iterator it = mojoDescriptors.iterator(); it.hasNext(); )
+ for ( Iterator it = pluginDescriptor.getMojos().iterator(); it.hasNext(); )
{
MojoDescriptor descriptor = (MojoDescriptor) it.next();
writeGoals( descriptor, w );
@@ -147,7 +145,7 @@
w.endElement();
}
- protected void processPluginDescriptor( MojoDescriptor mojoDescriptor, XMLWriter w, MavenProject project )
+ protected void processMojoDescriptor( MojoDescriptor mojoDescriptor, XMLWriter w )
{
String goalName = mojoDescriptor.getGoal();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org