windows上jetspeed2安装和配置
windows上jetspeed2安装和配置
1、jetspeed2的安装
首页
http://portals.apache.org/jetspeed-2/
下载文件
jetspeed-installer-demo-2.2.0.jar
安装
java -jar jetspeed-installer-demo-2.2.0.jar
打开了图形化安装界面
命令行安装
java -jar jetspeed-installer-minimal-2.2.0.jar text
我的安装路径
d:\tool\Jetspeed-2.2.0
选择数据库
mysql
下载mysql驱动
http://dev.mysql.com/downloads/
5.0驱动地址
http://dev.mysql.com/downloads/connector/j/5.0.html
启动
cd D:\tool\Jetspeed-2.2.0\bin
startup.bat
访问地址
http://localhost:8080/jetspeed/portal
http://localhost:8080/jetspeed/desktop
用户名和密码
admin -- System administrator, super user
manager - Has system administration rights, but not super user
user -- A sample user demonstrating with with a home page and advanced profiled menus
tomcat -- A sample user demonstrating a user without a home page
jetspeed -- A sample user demonstrating discovery of pages by both group and role fallback profiling algorithms
subsite -- Example of how to setup users with a primary subsite role fallback profiling rules
subsite2 -- Example of how to setup users with a secondary subsite role fallback profiling rules
devmgr -- Delegated security manager, can manage users with the "dev" (developer) role
2、创建自己的portal
参考文档
http://portals.apache.org/jetspeed-2/tutorial/index.html
http://portals.apache.org/jetspeed-2/buildguide/jetspeed-archetype.html
解开压缩文件
jetspeed-2-2.2.0-src.zip
cd E:\book\opensource\jetspeed\jetspeed-2-2.2.0
编译和安装jetspeed maven plugin
mvn install -P init
修改maven2配置文件D:\tool\apache-maven-2.2.1\conf\settings.xml
<pluginGroup>org.apache.portals.jetspeed-2</pluginGroup>
using the jetspeed-archetype maven plugin
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.0
-DartifactId=easyjetspeed
-Dpackage=cn.sccl.easyjetspeed
-DgroupId=cn.sccl.easyjetspeed -Dversion=1.0.0
生成easyjetspeed应用
cd D:\work
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.0
-DartifactId=easyjetspeed
-Dpackage=cn.sccl.easyjetspeed
-DgroupId=cn.sccl.easyjetspeed -Dversion=1.0.0
修改配置文件jetspeed-mvn-settings.xml
<org.apache.jetspeed.server.home>D:/eclipse-jee/apache-tomcat-6.0.18/</org.apache.jetspeed.server.home>
<org.apache.jetspeed.catalina.version.major>6</org.apache.jetspeed.catalina.version.major>
<org.apache.jetspeed.production.database.default.name>mysql</org.apache.jetspeed.production.database.default.name>
<org.apache.jetspeed.production.jdbc.driver.groupId>mysql</org.apache.jetspeed.production.jdbc.driver.groupId>
<org.apache.jetspeed.production.jdbc.driver.artifactId>mysql-connector-java</org.apache.jetspeed.production.jdbc.driver.artifactId>
<org.apache.jetspeed.production.jdbc.driver.version>5.1.6</org.apache.jetspeed.production.jdbc.driver.version>
<org.apache.jetspeed.production.database.driver>com.mysql.jdbc.Driver</org.apache.jetspeed.production.database.driver>
<org.apache.jetspeed.production.database.url><![CDATA[jdbc:mysql://127.0.0.1/easyjetspeed?useServerPrepStmts=false&jdbcCompliantTruncation=false]]></org.apache.jetspeed.production.database.url>
<org.apache.jetspeed.production.database.user>easyjetspeed</org.apache.jetspeed.production.database.user>
<org.apache.jetspeed.production.database.password>easyjetspeed</org.apache.jetspeed.production.database.password>
发布应用到tomcat
mvn jetspeed:mvn -Dtarget=all
其他命令
mvn jetspeed:mvn -Dtarget=deploy-pa
mvn jetspeed:mvn -Dtarget=deploy-portal
启动tomcat
D:\eclipse-jee\apache-tomcat-6.0.18\bin
启动报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deploymentManager' defined in ServletContext resource [/WEB-INF/assembly/deployment.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.w3c.dom.Element.getTextContent()Ljava/lang/String;
2009-09-07 14:23:34,171 [main] ERROR org.apache.jetspeed.engine.JetspeedServlet - Jetspeed: init() failed:
org.apache.jetspeed.exception.JetspeedException: Jetspeed Initialization exception!
at org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:142)
at org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:208)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
原来是我部署了pluto在这个tomcat上面,上面有下面两个包
xmlParserAPIs-2.6.2.jar
xercesImpl-2.6.2.jar
我重新找了个干净的tomcat就OK了。
访问
http://localhost:8080/easyjetspeed/portal