org.codehaus.modello.maven
Class ModelloGenerateMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.modello.maven.AbstractModelloGeneratorMojo
          extended by org.codehaus.modello.maven.AbstractModelloSourceGeneratorMojo
              extended by org.codehaus.modello.maven.ModelloGenerateMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="generate",
      defaultPhase=GENERATE_SOURCES,
      threadSafe=true)
public class ModelloGenerateMojo
extends AbstractModelloSourceGeneratorMojo

A dynamic way to use generators and Modello plugins.

Example Usage:

   <plugin>
     <groupId>org.codehaus.modello</groupId>
     <artifactId>modello-maven-plugin</artifactId>
     <version>1.3</version>
     <dependencies>
       <dependency>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-plugin-jpa</artifactId>
         <version>1.0.0-SNAPSHOT</version>
       </dependency>
     </dependencies>
     <configuration>
       <version>1.0.0</version>
       <packageWithVersion>false</packageWithVersion>
       <models>
         <model>src/main/mdo/project-model.xml</model>
       </models>
     </configuration>
     <executions>
       <execution>
         <id>java</id>
         <goals>
           <goal>generate</goal>
         </goals>
         <configuration>
           <generatorId>java</generatorId>
         </configuration>
       </execution>
       <execution>
         <id>jpa</id>
         <goals>
           <goal>generate</goal>
         </goals>
         <configuration>
           <generatorId>jpa-mapping</generatorId>
         </configuration>
       </execution>
     </executions>
   </plugin>
 

Author:
Joakim Erdfelt

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ModelloGenerateMojo()
           
 
Method Summary
 void execute()
           
protected  String getGeneratorType()
           
 
Methods inherited from class org.codehaus.modello.maven.AbstractModelloSourceGeneratorMojo
customizeParameters, getOutputDirectory, producesCompilableResult, setOutputDirectory
 
Methods inherited from class org.codehaus.modello.maven.AbstractModelloGeneratorMojo
createParameters, getBasedir, getModelloCore, getModels, getPackageWithVersion, getProject, getVersion, producesResources, setBasedir, setBuildContext, setModelloCore, setModels, setPackagedVersions, setPackageWithVersion, setProject, setVersion
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelloGenerateMojo

public ModelloGenerateMojo()
Method Detail

getGeneratorType

protected String getGeneratorType()
Specified by:
getGeneratorType in class AbstractModelloGeneratorMojo

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AbstractModelloGeneratorMojo
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2001-2013 Codehaus. All Rights Reserved.