第一次亲密接触Appfuse

 
早就想看看Appfuse了,但一直没时间。借着Appfuse 2的发布,把它提到日程上来。
 
话不多说,先上官网,照着Quick Start Guide ( http://appfuse.org/display/APF/AppFuse+QuickStart)create my first appfuse project step by step。下面只给出大致步骤,详细信息还得看官网的Quick Start Guide。
 
准备工作
1)      JDK 5 or later
2)      Mysql 5.x
3)      SMTP Server (对于首次接触appfuse,忽略这一步)
4)      Maven 2.0.x (如何使用maven参见 http://blog.csdn.net/totogogo/archive/2007/12/13/1933659.aspx
 
Create the first Appfuse project
Appfuse包含多个使用不同框架的project,下面以Struts 2 project为例。
1)      Check maven runs well
              mvn –version
 
2)      Create Struts 2 Basic project by running follow command:
       mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.1 -DgroupId=com.mycompany.app -DartifactId=myproject
      
       完成之后,在执行下一步之前,启动mysql。注意:如果mysql root account’s password is not empty, modify the <jdbc.username> and <jdbc.password> properties in your project's pom.xml first
 
3)      cd the project (created by step 2) root folder, run following command to :
              mvn
       注意:运行期间可能会出错,不需要理会
 
4)      run following command是为上面创建的project生成war,并把它配置到jetty web server上运行:
              mvn jetty:run-war
       该命令是把war file deploy to jetty server, 那么当你对你 project 里的 file (如 jsp or servlet )修改后,需要重新执行 mvn jetty:run-war 来重新 deploy
       如果你想即改即可反映到 jetty server 的话,你就需要执行 step 5(参看官网提供的vedio)
 
5)      非war file deploy:
       a) 执行命令: mvn war:inplace 来把dependent war的内容extract到你的project的src/main/webapp目录下
       b) (非常重要的一步) 删除 src/main/webapp/WEB-INF/lib 目录和 src/main/webapp/WEB-INF/classes/struts.xml 文件(if you're using Struts)没有这步的话,执行下面的命令mvn jetty:run会出错
       c) 执行命令: mvn jetty:run
 
 
Appfuse IDE
Appfuse 2目前只和IDEA( http://www.jetbrains.com/)集成得好,与Eclipse集成目前还会有这样那样的问题,而且Appfuse的eclipse plugin:Candy( http://candy4appfuse.sourceforge.net/Welcome.html)目前为止也没搞好。与Netbean的集成没试过。
 
 
注:如何使用 IDEA 来使用 APPFUSE ,强烈建议参看官方提供的 video
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值