利用maven部署apache的jetspeed门户一
我所使用的版本为:
(参考官方文档。)
第一部分:主要是自定义门户的生成。
第二部分:自定义自己的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
?
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 -vApache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)Java version: 1.6.0_10-rc2Java home: D:\Program Files\Java\jdk1.6.0_10\jreDefault locale: zh_CN, platform encoding: GBKOS 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-archtype-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.apache.portals.jetspeed2 -DarchetypeArtifactId=jetspeed-archetype -DarchetypeVersion=2.2.1 -DartifactI=jetexpress -Dpackage=org.apache.portals.tutorials -DgroupId=org.apache.portalstutorials -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-alha-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 (htp://repo1.maven.org/maven2).[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repositoryis elsewhere.Confirm properties configuration:groupId: org.apache.portals.tutorialsartifactId: jetexpressversion: 1.0-SNAPSHOTpackage: 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
?
在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&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>
?
通过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 'PARAMETER' because it does not exist.[ERROR] Failed to execute: DROP TABLE PORTLET_SUPPORTS[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PORTLET_SUPPORTS' because it does not exist.[ERROR] Failed to execute: DROP TABLE LANGUAGE[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'LANGUAGE' because it does not exist.[ERROR] Failed to execute: DROP TABLE PD_METADATA_FIELDS[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PD_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 'PA_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 'PORTLET_APPLICATION' because it does not exist.[ERROR] Failed to execute: DROP TABLE PORTLET_DEFINITION[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PORTLET_DEFINITION' because it does not exist.[ERROR] Failed to execute: DROP TABLE OJB_DMAP[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'OJB_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 'OJB_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 'OJB_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 'OJB_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 'OJB_DLIST' because it does not exist.[ERROR] Failed to execute: DROP TABLE OJB_NRM[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'OJB_NRM' because it does not exist.[ERROR] Failed to execute: DROP TABLE OJB_LOCKENTRY[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'OJB_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 'OJB_HL_SEQ' because it does not exist.[ERROR] Failed to execute: DROP TABLE CLUBS[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'CLUBS' because it does not exist.[ERROR] Failed to execute: DROP TABLE PROFILE_PAGE_ASSOC[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PROFILE_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 'PRINCIPAL_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 'RULE_CRITERION' because it does not exist.[ERROR] Failed to execute: DROP TABLE PROFILING_RULE[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PROFILING_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 'PAGE_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 'PAGE_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 'PAGE_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 'PAGE_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 'LINK_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 'LINK_CONSTRAINT' because it does not exist.[ERROR] Failed to execute: DROP TABLE LINK_METADATA[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'LINK_METADATA' because it does not exist.[ERROR] Failed to execute: DROP TABLE LINK[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'LINK' because it does not exist.[ERROR] Failed to execute: DROP TABLE FRAGMENT_PROP[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'FRAGMENT_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 'FRAGMENT_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 'FRAGMENT_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 'FRAGMENT_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 'FRAGMENT_CONSTRAINT' because it does not exist.[ERROR] Failed to execute: DROP TABLE FRAGMENT[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'FRAGMENT' because it does not exist.[ERROR] Failed to execute: DROP TABLE PAGE_MENU_METADATA[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PAGE_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 'PAGE_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 'PAGE_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 'PAGE_CONSTRAINT' because it does not exist.[ERROR] Failed to execute: DROP TABLE PAGE_METADATA[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PAGE_METADATA' because it does not exist.[ERROR] Failed to execute: DROP TABLE PAGE[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PAGE' because it does not exist.[ERROR] Failed to execute: DROP TABLE FOLDER_MENU_METADATA[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'FOLDER_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 'FOLDER_MENU' because it does not exist.[ERROR] Failed to execute: DROP TABLE FOLDER_ORDER[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'FOLDER_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 'FOLDER_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 'FOLDER_CONSTRAINT' because it does not exist.[ERROR] Failed to execute: DROP TABLE FOLDER_METADATA[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'FOLDER_METADATA' because it does not exist.[ERROR] Failed to execute: DROP TABLE FOLDER[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'FOLDER' because it does not exist.[ERROR] Failed to execute: DROP TABLE USER_ACTIVITY[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'USER_ACTIVITY' because it does not exist.[ERROR] Failed to execute: DROP TABLE ADMIN_ACTIVITY[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'ADMIN_ACTIVITY' because it does not exist.[ERROR] Failed to execute: DROP TABLE USER_STATISTICS[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'USER_STATISTICS' because it does not exist.[ERROR] Failed to execute: DROP TABLE PAGE_STATISTICS[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PAGE_STATISTICS' because it does not exist.[ERROR] Failed to execute: DROP TABLE PORTLET_STATISTICS[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'PORTLET_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 'MEDIATYPE_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 'MEDIATYPE_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 'CLIENT_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 'CLIENT_TO_CAPABILITY' because it does not exist.[ERROR] Failed to execute: DROP TABLE CAPABILITY[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'CAPABILITY' because it does not exist.[ERROR] Failed to execute: DROP TABLE MIMETYPE[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'MIMETYPE' because it does not exist.[ERROR] Failed to execute: DROP TABLE CLIENT[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'CLIENT' because it does not exist.[ERROR] Failed to execute: DROP TABLE MEDIA_TYPE[ERROR] java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'MEDIA_TYPE' because it does not exist.[INFO] Executing SQL script file: C:\Documents and Settings\Administrator\jetexpress\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.components.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\jetexpress\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. build 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\Administrator\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-tomcat-6.0.18\conf\server.xml[INFO] ------------------------------------[INFO] Traceorg.apache.maven.lifecycle.LifecycleExecutionException: Cannot find, read, or write target file to edit: \change\this\apache-tomcat-6.0.18\conf\server.xml at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.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执行;
?
未完,内容太多,放不下,续二
?