2010-06-17 72 views

回答

2

有Maven的2 Struts 1 Blank Archetype

$ mvn archetype:create        \ 
     -DarchetypeGroupId=org.apache.struts   \ 
     -DarchetypeArtifactId=struts-archetype-blank \ 
     -DarchetypeVersion=1.3.5      \ 
     -DgroupId=com.example       \ 
     -DpackageName=com.example.projectname   \ 
     -DartifactId=my-webapp 
0

您是否正在尋找有關Maven 2或Struts的教程? mvn archetype:生成應該是你的朋友。看看關於原型的docs

+0

使用archetype struts搜索Maven 2的教程 – Mercer 2010-06-17 09:29:46

3

如果您需要獲得在struts-原型空白原型的更多信息:

第1步

的支柱-archetype-blank原型不再位於默認的Maven2存儲庫中。因此,您必須從http://svn.apache.org/repos/asf/struts/maven/trunk/struts-archetype-blank手動檢查它。

步驟#2

建立在struts-原型空白-1.3.5-SNAPSHOT.jar文件:mvn install

步驟#3

安裝原型:

mvn install:install-file 
    -DgroupId=org.apache.struts 
    -DartifactId=struts-archetype-blank 
    -Dversion=1.3.5-SNAPSHOT 
    -Dpackaging=jar 
    -Dfile=struts-archetype-blank-1.3.5-SNAPSHOT.jar 

步驟#4

創建了Struts1 Maven2的項目(如帕斯卡Thivent指出):

mvn archetype:create 
    -DarchetypeGroupId=org.apache.struts 
    -DarchetypeArtifactId=struts-archetype-blank 
    -DarchetypeVersion=1.3.5-SNAPSHOT 
    -DgroupId=com.example 
    -DpackageName=com.example.projectname 
    -DartifactId=my-webapp 

祝你好運!