Maven AppFuse Plugin



  • appfuse:gen-model:根据数据库的表生成java类 
  • appfuse:gen:  根据 POJOs.生成并安装 Tests, DAOs, Managers, Controllers and Views
  • appfuse:remove: 删除appfuse:gen.生成的代码
  • appfuse:full-source: Converts AppFuse basic projects to full-source with no AppFuse dependencies. Also renames packages to match your project's groupId.

In the pom.xml, insert this segment.

xml 代码
 
  1. <project>  
  2. ...  
  3.   <build>  
  4.     <plugins>  
  5.       <plugin>  
  6.         <groupId>org.codehaus.mojogroupId>  
  7.         <artifactId>appfuse-maven-pluginartifactId>  
  8.         <version>2.0version>  
  9.         <configuration>  
  10.           <genericCore>truegenericCore>   
  11.           <fullSource>falsefullSource>   
  12.         configuration>  
  13.         <dependencies>  
  14.           <dependency>  
  15.             <groupId>${jdbc.groupId}groupId>  
  16.             <artifactId>${jdbc.artifactId}artifactId>  
  17.             <version>${jdbc.version}version>  
  18.           dependency>  
  19.         dependencies>  
  20.       plugin>  
  21.     plugins>  
  22.   build>  
  23. ...  
  24. project>  

File<o:p></o:p>

Comment Replaced<o:p></o:p>

Web Framework<o:p></o:p>

src/main/webapp/WEB-INF/applicationContext.xml<o:p></o:p>

<o:p></o:p>

All<o:p></o:p>

src/main/webapp/WEB-INF/applicationContext.xml<o:p></o:p>

<o:p></o:p>

All<o:p></o:p>

core/src/main/resources/applicationContext.xml<o:p></o:p>

<o:p></o:p>

All<o:p></o:p>

core/src/main/resources/applicationContext.xml<o:p></o:p>

<o:p></o:p>

All<o:p></o:p>

src/main/webapp/WEB-INF/faces-config.xml<o:p></o:p>

<o:p></o:p>

JSF<o:p></o:p>

src/main/webapp/WEB-INF/faces-config.xml<o:p></o:p>

<o:p></o:p>

JSF<o:p></o:p>

src/main/webapp/WEB-INF/dispatcher-servlet.xml<o:p></o:p>

<o:p></o:p>

Spring MVC<o:p></o:p>

src/main/webapp/WEB-INF/applicationContext.xml<o:p></o:p>

<o:p></o:p>

Struts<o:p></o:p>

src/main/resources/struts.xml<o:p></o:p>

<o:p></o:p>

Struts<o:p></o:p>






生成 CRUD 用 AMP
In the AppFuse 2.0 M5 release, you can run the following command to generate

CRUD screens/classes for a POJO:

appfuse:gen -Dentity=Name

If you don't specify the entity name, you're prompted for it. After generating

the code, you can install it using:

appfuse:install -Dentity=Name

Your entity must be defined in your hibernate.cfg.xml file for this to work.

In a modular project, these commands must be run in the "core" and "web"

modules. The plugin is smart enough to figure out when it should/should not

generate stuff based on the packaging type (jar vs. war). In a future release,

we hope to combine "gen" and "install" into a single command.



The Maven Hibernate3 Plugin has seven goals.

    * hibernate3:hbm2cfgxml: Generates hibernate.cfg.xml
    * hibernate3:hbm2ddl: Generates database schema.
    * hibernate3:hbm2doc: Generates HTML documentation for the database

schema.
    * hibernate3:hbm2hbmxml: Generates a set of hbm.xml files
    * hibernate3:hbm2java: Generates Java classes from set of *.hbm.xml files
    * hibernate3:schema-export: Creates SQL DDL file and generates the

database schema from set of *.hbm.xml files
    * hibernate3:schema-update: Updates the database schema based on the set

of *.hbm.xml files
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值