- 这里是列表文本jetspeed 提供了方便的方式构建portal主项目和portlets应用程序:
mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate \
-DarchetypeGroupId=org.apache.portals.jetspeed-2 \
-DarchetypeArtifactId=jetspeed-archetype \
-DarchetypeVersion=2.2.2 \
-DartifactId=hello \
-Dpackage=org.example \
-DgroupId=org.example -Dversion=1.0.0
- 执行命令以后会在当前目录下生成hello-pa和hello-portal两个目录及jetspeed-mvn-settings.xml pom.xml两个文件: jetspeed-mvn-settings.xml中定义tomcat、数据库等的配置信息; pom.xml中定义maven goal、依赖的jar的版本号等信息; hello-pa是portlet工程; hello-portal是jetspeed portal 工程。
- 导入工程到IDE时需要注意,生成的maven工程依赖jetspeed的maven plugin: jetspeed-unpack-maven-plugin jetspeed-deploy-maven-plugin jetspeed-fileutils-maven-plugin 以及jetspeed的maven工程: jetspeed-layouts(各种装饰、YUI、dojo等资源会拷贝到hello-portal下) jetspeed-portal-resources(拷贝res资源)