windows上jetspeed2安装和配置

windows上jetspeed2安装和配置

1、jetspeed2的安装
首页
http://portals.apache.org/jetspeed-2/

下载文件
jetspeed-installer-minimal-2.2.0.jar

安装
java -jar jetspeed-installer-minimal-2.2.0.jar
打开了图形化安装界面

命令行安装
java -jar jetspeed-installer-minimal-2.2.0.jar text

我的安装路径
e:\apache\Jetspeed-2.2.0

选择数据库
mysql

下载mysql驱动
http://dev.mysql.com/downloads/
5.0驱动地址
http://dev.mysql.com/downloads/connector/j/5.0.html

启动
cd e:\apache\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=surpassPortal
    -Dpackage=cn.surpass.surpassPortal
    -DgroupId=cn.surpass.surpassPortal -Dversion=1.0.0

生成surpassPortal 应用
cd e:\workspace

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=surpassPortal
-Dpackage=cn.surpass.surpassPortal
-DgroupId=cn.surpass.surpassPortal -Dversion=1.0.0

修改配置文件jetspeed-mvn-settings.xml
<org.apache.jetspeed.server.home>d:/dev/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/portal?useServerPrepStmts=false&amp;jdbcCompliantTruncation=false]]></org.apache.jetspeed.production.database.url>
<org.apache.jetspeed.production.database.user>portal</org.apache.jetspeed.production.database.user>
<org.apache.jetspeed.production.database.password>portal</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

 

访问
http://localhost:8080/surpassPortal/portal

你可能感兴趣的:(apache,maven,tomcat,windows,mysql)