View Javadoc

1   package org.appfuse.mojo.exporter;
2   
3   import org.hibernate.tool.hbm2x.Exporter;
4   import org.apache.maven.plugin.MojoExecutionException;
5   
6   /**
7    * Generates Java classes and tests for DAOs and Managers from set of annotated POJOs.
8    *
9    * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
10   * @goal gen-core
11   * @phase generate-sources
12   * @execute phase="compile"
13   */
14  public class AppFuseGenerateCoreMojo extends AppFuseGeneratorMojo {
15  
16      public AppFuseGenerateCoreMojo() {
17          addDefaultComponent("target/appfuse/generated-sources", "configuration", false);
18          addDefaultComponent("target/appfuse/generated-sources", "annotationconfiguration", true);
19      }
20  
21      /**
22       * Returns <b>gen-core</b>.
23       *
24       * @return String goal's name
25       */
26      public String getName() {
27          return "gen-core";
28      }
29  
30      @Override
31      protected Exporter configureExporter(Exporter exp) throws MojoExecutionException {
32          super.setGenerateCoreOnly(true);
33          return super.configureExporter(exp);
34      }
35  }