英文原文地址:[url]http://struts.apache.org/2.x/docs/developing-a-portlet-using-eclipse.html[/url]
以上命令将在当前目录下生成以下目录结构:
./src/main/java/com/mycompany/myportlet/view/IndexAction.java
./src/main/java/com/mycompany/myportlet/edit/IndexAction.java
./src/main/webapp/WEB-INF/web.xml
./src/main/webapp/WEB-INF/view/index.jsp
./src/main/webapp/WEB-INF/portlet.xml
./src/main/webapp/WEB-INF/edit/index-success.jsp
./src/main/webapp/WEB-INF/edit/index-input.jsp
./src/main/webapp/WEB-INF/help/index.jsp
./src/main/webapp/index.jsp
./src/main/resources/struts.xml
./pom.xml
生成Eclipse工程文件:
mvn -Dwtpversion=1.0 -DdownloadSources=true eclipse:eclipse
。。。。。。。。。。
。。。。。。。。。。
mvn archetype:create -DgroupId=com.sf.portlet -DartifactId=portlet -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-portlet -DarchetypeVersion=2.0.9-SNAPSHOT -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository
以上命令将在当前目录下生成以下目录结构:
./src/main/java/com/mycompany/myportlet/view/IndexAction.java
./src/main/java/com/mycompany/myportlet/edit/IndexAction.java
./src/main/webapp/WEB-INF/web.xml
./src/main/webapp/WEB-INF/view/index.jsp
./src/main/webapp/WEB-INF/portlet.xml
./src/main/webapp/WEB-INF/edit/index-success.jsp
./src/main/webapp/WEB-INF/edit/index-input.jsp
./src/main/webapp/WEB-INF/help/index.jsp
./src/main/webapp/index.jsp
./src/main/resources/struts.xml
./pom.xml
生成Eclipse工程文件:
mvn -Dwtpversion=1.0 -DdownloadSources=true eclipse:eclipse
。。。。。。。。。。
。。。。。。。。。。