<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,然后和创建表,再重新编译部署。