好用的Maven2创建Struct2的方法

网上好多用maven2创建struct2的文章,不过能用的没有几个,Google了一下,终于找个一个,哈哈!

原文链接 http://cwiki.apache.org/confluence/display/WW/Struts+Maven+Archetypes

1 创建方法
mvn archetype:create -DgroupId=tutorial /
-DartifactId=tutorial /
-DarchetypeGroupId=org.apache.struts /
-DarchetypeArtifactId=struts2-archetype-starter /
-DarchetypeVersion=2.0.11.2

2 参数介绍

 

Name Description
groupId The id for the group the application belongs to. Usually is the root package for applications in your company, e.g. com.mycompany
artifactId The id for the project
package The base Java package to use for generated source code. Defaults to archetypeGroupId if not specified.
archetypeGroupId The group id of the archetype. Will always be org.apache.struts for Struts archetypes
archetypeArtifactId The id of the archetype
archetypeVersion The version of the archetype
remoteRepositories A list of remote repositories that contain the archetype. If deployed to the standard Maven repository or locally, this is optional

The Archetype will create a ready-run Struts project. Just run "mvn install" to build.

 

3 常用命令

  • To build
       mvn install
  • To create IntelliJ IDEA project files
       mvn idea:idea
  • To create Eclipse project files
       mvn eclipse:eclipse
  • To run test cases
       mvn test
  • To clean up
       mvn clean
  • To package
       mvn package
    
  • To grab necessary JAR files etc.
       mvn initialize
  • To run it with Jetty
       mvn jetty:run
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值