o adding mojos for the generation of the bean adapter and jelly harness. we

want to start generating these things for the mojos in the mojo project.

  Jeremy, I will test these tomorrow but if you want to give them a shot
  go for it and I will clean up whatever is necessary to make them work
  in m1 for the g build.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162760 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-06-15 05:27:03 +00:00
parent 287f2dafc6
commit 891c9ad1dd
3 changed files with 91 additions and 1 deletions

View File

@ -0,0 +1,45 @@
package org.apache.maven.plugin.plugin;
import org.apache.maven.plugin.generator.BeanGenerator;
/**
* @goal bean
*
* @description Goal for generating a plugin descriptor.
*
* @parameter
* name="sourceDirectory"
* type="String"
* required="true"
* validator=""
* expression="#project.build.sourceDirectory"
* description=""
* @parameter
* name="outputDirectory"
* type="String"
* required="true"
* validator=""
* expression="#project.build.directory/generated-sources"
* description=""
* @parameter
* name="pom"
* type="String"
* required="true"
* validator=""
* expression="#project.getFile().getPath()"
* description=""
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
*/
public class BeanGeneratorMojo
extends AbstractPluginMojo
{
protected void generate( String sourceDirectory, String outputDirectory, String pom )
throws Exception
{
BeanGenerator generator = new BeanGenerator();
generator.execute( sourceDirectory, outputDirectory, pom );
}
}

View File

@ -18,7 +18,7 @@ import org.apache.maven.plugin.generator.PluginDescriptorGenerator;
* name="outputDirectory"
* type="String"
* required="true"
* validator="" *
* validator=""
* expression="#project.build.directory/classes/META-INF/maven"
* description=""
* @parameter

View File

@ -0,0 +1,45 @@
package org.apache.maven.plugin.plugin;
import org.apache.maven.plugin.generator.jelly.JellyHarnessGenerator;
/**
* @goal jelly
*
* @description Goal for generating a plugin descriptor.
*
* @parameter
* name="sourceDirectory"
* type="String"
* required="true"
* validator=""
* expression="#project.build.sourceDirectory"
* description=""
* @parameter
* name="outputDirectory"
* type="String"
* required="true"
* validator=""
* expression="#project.build.output
* description=""
* @parameter
* name="pom"
* type="String"
* required="true"
* validator=""
* expression="#project.getFile().getPath()"
* description=""
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @version $Id$
*/
public class JellyGeneratorMojo
extends AbstractPluginMojo
{
protected void generate( String sourceDirectory, String outputDirectory, String pom )
throws Exception
{
JellyHarnessGenerator generator = new JellyHarnessGenerator();
generator.execute( sourceDirectory, outputDirectory, pom );
}
}