利用maven部署apache的jetspeed门户一

我所使用的版本为:

Jetspeed-2 2.2.1;manen-2.2.1;apach-tomcat-6.0.18;jdk6;mysql5

参考官方文档。)

第一部分:主要是自定义门户的生成。

第二部分:自定义自己的portal设计;

第三部分:Portlet的开发

第四部分:Jetspeed Services


准备工作之下载软件:

1、下载jetspeed,下载地址为http://portals.apache.org/jetspeed-2/download.html;下载其最新版本:jetspeed-2-2.2.1-source-release.zip,有兴趣的同学可以下载jetspeed-installer-2.2.1.jar

Jetspeed-2 标准安装版是带有Minimal 和 Demo ;它支持以下数据库:

 Derby (默认的), DB2, MySQL, MSSQL, Oracle, PostgreSQL, SapDB,同时在安装包里面提供ant脚本。

2、下载maven2.2.1,下载地址为http://maven.apache.org/download.html,

我这里使用的是:apache-maven-2.2.1-bin.zip

3、下载tomcat6.0.18,下载地址为http://tomcat.apache.org/download-60.cgi

准备工作之设置maven环境变量

 

4、把下载的maven-2.2.1解压出来,我解压的目录是:D:\opensource\apache-maven-2.2.1

5、类似java的环境变量一样,右键我的电脑->属性->高级->环境变量->新建系统变量(用户变量也可以)->输入变量    名:M2_HOME,变量值:D:\opensource\apache-maven-2.2.1,编辑path,输入%M2_HOME%\bin;

6、测试maven的环境变量是否配置正确,运行输入cmd,dos界面输入mvn -v,若显示类似如下显示,则表示配置maven变量正确。

 

 

C:\Documents and Settings\Administrator>mvn -v
Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
Java version: 1.6.0_10-rc2
Java home: D:\Program Files\Java\jdk1.6.0_10\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
C:\Documents and Settings\Administrator>
 

利用maven生成一个新的自定义的petspeed,名为jetexpress

1、在dos界面输入以下命令:

 

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.1 \
    -DartifactId=jetexpress \
    -Dpackage=org.apache.portals.tutorials \
    -DgroupId=org.apache.portals.tutorials \
    -Dversion=1.0-SNAPSHOT
 

 

2、显示如下信息:

 

C:\Documents and Settings\Administrator>mvn org.apache.maven.plugins:maven-arch
type-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.apache.portals.jetspeed
2 -DarchetypeArtifactId=jetspeed-archetype -DarchetypeVersion=2.2.1 -DartifactI
=jetexpress -Dpackage=org.apache.portals.tutorials -DgroupId=org.apache.portals
tutorials -Dversion=1.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [org.apache.maven.plugins:maven-archetype-plugin:2.0-al
ha-4:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexu
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[WARNING] No archetype repository found. Falling back to central repository (ht
p://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository
is elsewhere.
Confirm properties configuration:
groupId: org.apache.portals.tutorials
artifactId: jetexpress
version: 1.0-SNAPSHOT
package: org.apache.portals.tutorials
 Y: :
 

 

3、回车,显示如下信息:

 

 Y: : y
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Fri Oct 29 15:09:03 CST 2010
[INFO] Final Memory: 8M/14M
[INFO] ------------------------------------------------------------------------
C:\Documents and Settings\Administrator>

 

 同时,生成一个文件夹jetexpress。路径为:C:\Documents and Settings\Administrator\jetexpress

 

 

在上一步我们用Jetspeed Archetype for Maven生成的jetexpress, 他的结构内容如下:
    jetexpress/
    |-- jetexpress-pa
    |   |-- jetspeed-mvn-pa-pom.xml
    |   |-- pom.xml
    |   `-- src
    |       `-- main
    |           |-- java
    |           |   `-- org
    |           |       `-- apache
    |           |           `-- portals
    |           |               `-- tutorials
    |           |                   `-- MyPortlet.java
    |           `-- webapp
    |               |-- WEB-INF
    |               |   |-- portlet.xml
    |               |   `-- web.xml
    |               |-- help.jsp
    |               |-- maximized.jsp
    |               `-- normal.jsp
    |-- jetexpress-portal
    |   |-- jetspeed-mvn-portal-pom.xml
    |   |-- pom.xml
    |   `-- src
    |       |-- main
    |       |   `-- webapp
    |       |       `-- WEB-INF
    |       |           `-- pages
    |       |               `-- default-page.psml
    |       `-- sql
    |           `-- min
    |               `-- j2-seed.xml
    |-- jetspeed-mvn-settings.xml
    `-- pom.xml

 

配置tomcat容器和数据库的位置

在jetexpress根目录下的文件jetspeed-mvn-settings.xml 包含这应用服务器和数据库的位置信息。生成的项目是配置成使用tomcat作为应用服务器,derby作为数据库的。

 

找到 org.apache.jetspeed.server.home 配置参数 然后改成我们tomcat的目录,我的tomcat是放在

D:\opensource\apache-tomcat-6.0.18

<org.apache.jetspeed.server.home>D:\opensource\apache-tomcat-6.0.18</org.apache.jetspeed.server.home>

找到 org.apache.jetspeed.production.database.url 配置参数. 直接把derby的数据库连接注释掉,开启mysql的连接;

配置内容如下:

 

 <properties>
        
        <org.apache.jetspeed.server.home>/change/this/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/jetspeed?useServerPrepStmts=false&amp;jdbcCompliantTruncation=false]]></org.apache.jetspeed.production.database.url>
          <org.apache.jetspeed.production.database.user>username</org.apache.jetspeed.production.database.user>
          <org.apache.jetspeed.production.database.password>password</org.apache.jetspeed.production.database.password>
      
          <!--
        <org.apache.jetspeed.production.jdbc.driver.groupId>org.apache.derby</org.apache.jetspeed.production.jdbc.driver.groupId>
        <org.apache.jetspeed.production.jdbc.driver.artifactId>derby</org.apache.jetspeed.production.jdbc.driver.artifactId>
        
        <org.apache.jetspeed.production.jdbc.driver.version>10.3.2.1</org.apache.jetspeed.production.jdbc.driver.version>
        <org.apache.jetspeed.production.database.default.name>derby</org.apache.jetspeed.production.database.default.name>
        <org.apache.jetspeed.production.database.url>jdbc:derby:/tmp/jetspeed/derby/productiondb;create=true</org.apache.jetspeed.production.database.url>
        <org.apache.jetspeed.production.database.driver>org.apache.derby.jdbc.EmbeddedDriver</org.apache.jetspeed.production.database.driver>
        <org.apache.jetspeed.production.database.user></org.apache.jetspeed.production.database.user>
        <org.apache.jetspeed.production.database.password></org.apache.jetspeed.production.database.password>
          -->
      </properties>

 

 4、配置 Jetspeed Maven插件

 

 

Maven 有一个全局的配置文件:settings.xml,它位于你的用户主目录下的 .m2 目录.在window上为: %USERPROFILE%\.m2\settings.xml . 如果该文件不存在你的系统上,你可以自己创建它,和复制粘贴下面的代码到你的xml里面。如果,已经存在了,为jetspeed增加pluginGroup 配置信息。

<settings xmlns="http://maven.apache.org/POM/4.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
       http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <pluginGroups>
    <pluginGroup>org.apache.portals.jetspeed-2</pluginGroup>
  </pluginGroups>
  
  <!-- There might be more configuration here -->
       
</settings>

 

5、构建和部署我们的jetexpress门户

通过dos界面进入到jetexpress的根目录;

如下:C:\Documents and Settings\Administrator>cd jetexpress

C:\Documents and Settings\Administrator\jetexpress>mvn jetspeed:mvn -Dtarget=all
 接着输入: mvn jetspeed:mvn -Dtarget=all,回车,

显示如下信息:[ERROR] Failed to execute: DROP TABLE PARAMETER

。。。。。省略一部分信息
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
ARAMETER' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PORTLET_SUPPORTS
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
ORTLET_SUPPORTS' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE LANGUAGE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'L
ANGUAGE' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PD_METADATA_FIELDS
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
D_METADATA_FIELDS' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PA_METADATA_FIELDS
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
A_METADATA_FIELDS' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PORTLET_APPLICATION
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
ORTLET_APPLICATION' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PORTLET_DEFINITION
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
ORTLET_DEFINITION' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_DMAP
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_DMAP' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_DSET_ENTRIES
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_DSET_ENTRIES' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_DSET
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_DSET' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_DLIST_ENTRIES
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_DLIST_ENTRIES' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_DLIST
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_DLIST' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_NRM
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_NRM' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_LOCKENTRY
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_LOCKENTRY' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE OJB_HL_SEQ
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'O
JB_HL_SEQ' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE CLUBS
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'C
LUBS' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PROFILE_PAGE_ASSOC
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
ROFILE_PAGE_ASSOC' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PRINCIPAL_RULE_ASSOC
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
RINCIPAL_RULE_ASSOC' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE RULE_CRITERION
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'R
ULE_CRITERION' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PROFILING_RULE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
ROFILING_RULE' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_SEC_CONSTRAINTS_REF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_SEC_CONSTRAINTS_REF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_SEC_CONSTRAINT_DEF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_SEC_CONSTRAINT_DEF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_SEC_CONSTRAINTS_DEF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_SEC_CONSTRAINTS_DEF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_SECURITY
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_SECURITY' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE LINK_CONSTRAINTS_REF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'L
INK_CONSTRAINTS_REF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE LINK_CONSTRAINT
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'L
INK_CONSTRAINT' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE LINK_METADATA
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'L
INK_METADATA' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE LINK
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'L
INK' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FRAGMENT_PROP
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
RAGMENT_PROP' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FRAGMENT_PREF_VALUE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
RAGMENT_PREF_VALUE' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FRAGMENT_PREF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
RAGMENT_PREF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FRAGMENT_CONSTRAINTS_REF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
RAGMENT_CONSTRAINTS_REF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FRAGMENT_CONSTRAINT
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
RAGMENT_CONSTRAINT' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FRAGMENT
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
RAGMENT' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_MENU_METADATA
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_MENU_METADATA' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_MENU
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_MENU' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_CONSTRAINTS_REF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_CONSTRAINTS_REF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_CONSTRAINT
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_CONSTRAINT' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_METADATA
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_METADATA' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FOLDER_MENU_METADATA
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
OLDER_MENU_METADATA' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FOLDER_MENU
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
OLDER_MENU' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FOLDER_ORDER
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
OLDER_ORDER' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FOLDER_CONSTRAINTS_REF
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
OLDER_CONSTRAINTS_REF' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FOLDER_CONSTRAINT
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
OLDER_CONSTRAINT' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FOLDER_METADATA
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
OLDER_METADATA' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE FOLDER
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'F
OLDER' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE USER_ACTIVITY
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'U
SER_ACTIVITY' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE ADMIN_ACTIVITY
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'A
DMIN_ACTIVITY' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE USER_STATISTICS
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'U
SER_STATISTICS' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PAGE_STATISTICS
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
AGE_STATISTICS' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE PORTLET_STATISTICS
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'P
ORTLET_STATISTICS' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE MEDIATYPE_TO_MIMETYPE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'M
EDIATYPE_TO_MIMETYPE' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE MEDIATYPE_TO_CAPABILITY
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'M
EDIATYPE_TO_CAPABILITY' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE CLIENT_TO_MIMETYPE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'C
LIENT_TO_MIMETYPE' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE CLIENT_TO_CAPABILITY
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'C
LIENT_TO_CAPABILITY' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE CAPABILITY
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'C
APABILITY' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE MIMETYPE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'M
IMETYPE' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE CLIENT
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'C
LIENT' because it does not exist.
[ERROR] Failed to execute:    DROP TABLE MEDIA_TYPE
[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'M
EDIA_TYPE' because it does not exist.
[INFO] Executing SQL script file: C:\Documents and Settings\Administrator\jetexp
ress\jetexpress-portal\target\ddl\derby\create-schema.sql
[INFO] [jetspeed-db:init {execution: seed}]
log4j:WARN No appenders could be found for logger (org.apache.jetspeed.component
s.JetspeedBeanDefinitionFilter).
log4j:WARN Please initialize the log4j system properly.
[INFO] creating clients, mediatypes and mimetypes
[INFO] creating principals and permissions
[INFO] creating permissions
[INFO] creating profiling rules and user profiling rules
[INFO] creating entities
[INFO] creating SSO sites, principals, and security domains
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 5 seconds
[INFO] Finished at: Fri Oct 29 15:30:07 CST 2010
[INFO] Final Memory: 25M/45M
[INFO] ------------------------------------------------------------------------
[INFO] ...SUCCESS.
[INFO] Executing target: db dependent on [db-portal] ONLY: all done
[INFO] Executing target: deploy-portal dependent on [install]
[INFO] Invoking target deploy-portal: C:\Documents and Settings\Administrator\je
texpress\jetexpress-portal\jetspeed-mvn-portal-pom.xml deploy
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Jetspeed-2 Maven Invoker Configuration for My Portal
[INFO]    task-segment: [process-resources]
[INFO] ------------------------------------------------------------------------
[INFO] [jetspeed-unpack:unpack {execution: unpack-appserver}]
[INFO] [resources:resources {execution: resources}]
[WARNING] File encoding has not been set, using platform encoding GBK, i.e. buil
d is platform dependent!
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e
. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Documents and Settings\Administrat
or\jetexpress\jetexpress-portal\src\conf
[INFO] Copying 1 resource to ../resources
[WARNING] While downloading xml-apis:xml-apis:2.0.2
  This artifact has been relocated to xml-apis:xml-apis:1.0.b2.


[INFO] [jetspeed-deploy:deploy {execution: deploy}]
[INFO] Deploying to targetBaseDir C:\change\this\apache-tomcat-6.0.18
[INFO]   deploying to lib: portlet-api_2.0_spec-1.0.jar
[INFO]   deploying to lib: ccpp-1.0.jar
[INFO]   deploying to lib: jetspeed-api-2.2.1.jar
[INFO]   deploying to lib: jetspeed-commons-2.2.1.jar
[INFO]   deploying to lib: pluto-container-api-2.0.0.jar
[INFO]   deploying to lib: pluto-taglib-2.0.0.jar
[INFO]   deploying to lib: portals-bridges-common-2.0.jar
[INFO]   deploying to system: derby-10.3.2.1.jar
[INFO]   deploying to war: jetexpress (expanded)
[INFO]   deploying to context: jetexpress.xml
[INFO]   deploying to war: j2-admin.war
[INFO]   deploying to server-lib: apa-logging-1.0.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot find, read, or write target file to edit: \change\this\apache-tomc
at-6.0.18\conf\server.xml
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot find, read, or wr
ite target file to edit: \change\this\apache-tomcat-6.0.18\conf\server.xml
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6
0)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot find, read, or
 write target file to edit: \change\this\apache-tomcat-6.0.18\conf\server.xml
        at org.apache.jetspeed.maven.plugins.DeployMojo.execute(DeployMojo.java:
572)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
        ... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Fri Oct 29 15:30:13 CST 2010
[INFO] Final Memory: 10M/19M
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] ...FAILED[code=1].
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 47 seconds
[INFO] Finished at: Fri Oct 29 15:30:14 CST 2010
[INFO] Final Memory: 6M/11M
[INFO] ------------------------------------------------------------------------
C:\Documents and Settings\Administrator\jetexpress>
 

 

编译出错,从错位信息看,可能是数据库没创建之类导致的,那么我们可以到这个目录:

C:\Documents and Settings\Administrator\jetexpress\jetexpress-portal\target\dll,里面生成了两个脚本,

但发现是derby数据库脚本,我们是用mysql 的,那么我们先在mysql创建数据库jetspeed,然后和创建表,再重新编译部署。

 

mysql> create database jetspeed;
Query OK, 1 row affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| demo               |
| jetspeed           |
| light              |
| mysql              |
| phpmyadmin         |
| tera_wurfl_demo    |
| test               |
| wurfl              |
+--------------------+
9 rows in set (0.00 sec)

 把以下表的脚本,在mysql执行;

 

未完,内容太多,放不下,续二

 http://inotgaoshou.iteye.com/blog/797735

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值