View Javadoc

1   package org.appfuse.mojo.refactor;
2   
3   import org.apache.maven.plugin.MojoExecutionException;
4   import org.apache.maven.plugin.MojoFailureException;
5   import org.appfuse.mojo.HibernateExporterMojo;
6   import org.appfuse.tool.RenamePackages;
7   import org.hibernate.tool.hbm2x.Exporter;
8   
9   /**
10   * Refactors appfuse.org from imports, files, mappings, etc.
11   *
12   * @author <a href="mailto:david@capehenrytech.com">David L. Whitehurst</a>
13   * @goal refactor-packages
14   */
15  public class AppFusePackageRefactorMojo extends HibernateExporterMojo {
16  
17      @Override
18      public void execute() throws MojoExecutionException, MojoFailureException {
19  
20          RenamePackages tool = new RenamePackages(getProject().getGroupId());
21          tool.execute();
22          
23      }
24  
25      /**
26       * extending Hibernate exporter only to access the Maven project
27       *
28       * @return null
29       */
30      protected Exporter createExporter() {
31          return null;  //unused at this time
32      }
33  
34      /**
35       * extending Hibernate exporter only to access the Maven project
36       *
37       * @return null
38       */
39      public String getName() {
40          return null;  //unused at this time
41      }
42  }