appfuse2.1M2上手与集成

1.使用archetype-plugin进行框架生成:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-5:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts-archetype -DarchetypeVersion=2.1.0-M2 -DgroupId=com.qhtest -DartifactId=site2

 

生成以后配置数据库与邮件服务器。为pom文件中的依赖添加版本(默认没有,郁闷。。)

 

        <aspectj.version>1.6.9</aspectj.version>
        <commons.beanutils.version>1.8.3</commons.beanutils.version>
        <commons.collections.version>3.2.1</commons.collections.version>
        <commons.dbcp.version>1.3</commons.dbcp.version>
        <commons.lang.version>2.5</commons.lang.version>
        <compass.version>2.2.0</compass.version>
        <cxf.version>2.2.4</cxf.version>
        <dwr.version>2.0.1</dwr.version>
        <ehcache.version>2.2.0</ehcache.version>
        <ehcache.web.version>2.0.2</ehcache.web.version>
        <hibernate.annotations.version>3.4.0.GA</hibernate.annotations.version>
        <hibernate.version>3.3.2.GA</hibernate.version>
        <javamail.version>1.4.1</javamail.version>
        <jpa.version>1.0</jpa.version>
        <jstl.version>1.1.2</jstl.version>
        <log4j.version>1.2.16</log4j.version>
        <sitemesh.version>2.4.2</sitemesh.version>
        <slf4j.version>1.6.1</slf4j.version>
        <spring.security.version>3.0.4.RELEASE</spring.security.version>
        <struts.menu.version>2.4.3</struts.menu.version>
        <urlrewrite.version>3.1.0</urlrewrite.version>
        <velocity.version>1.4</velocity.version>

 

下边是我自己组织的:
<aspectj.version>1.6.0</aspectj.version>
        <commons.beanutils.version>1.8.1</commons.beanutils.version>
        <commons.dbcp.version>1.2.1</commons.dbcp.version>
        <commons.lang.version>2.4</commons.lang.version>
        <commons.collections.version>3.2</commons.collections.version>
        <compass.version>2.1.3</compass.version>
        <cxf.version>2.2.4</cxf.version>
        <clickstream.version>1.0.2</clickstream.version>
        <displaytag.version>1.1.1</displaytag.version>
        <dwr.version>2.0.1</dwr.version>
        <ehcache.version>1.7.0</ehcache.version>
        <ehcache.web.version>1.6.0-beta2</ehcache.web.version>
        <hibernate.annotations.version>3.4.0.GA</hibernate.annotations.version>
        <hibernate.version>3.3.1.GA</hibernate.version>
        <javamail.version>1.4.1</javamail.version>
        <jpa.version>1.0</jpa.version>
        <jstl.version>1.1.2</jstl.version>
        <log4j.version>1.2.13</log4j.version>
        <slf4j.version>1.6.1</slf4j.version> 
        <sitemesh.version>2.4.2</sitemesh.version>
        <spring.security.version>3.0.5.RELEASE</spring.security.version>
        <struts.menu.version>2.4.3</struts.menu.version>
        <urlrewrite.version>3.1.0</urlrewrite.version>
        <velocity.version>1.4</velocity.version>

 

2.cd site:

mvn appfuse:full-source

生成的代码有个小问题, 比如com.qhtest.webapp.webapp.action 这个webapp是不需要的,可以通过目录拷贝方式调整一下

3.用jetty跑一下:

mvn jetty:run-war

 应该哦了。

------------------------------------------

接下来把项目弄到myeclipse8.5中去~

4.eclipse最新的plugin跟这个项目会有问题,我们使用稍老的版本:

mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse

 

5.打开myeclipse,import项目

 

to be continue..

 

你可能感兴趣的:(maven,Hibernate,DWR,jpa,Appfuse)