在更新该项目之前,我有一个在 Eclipse 3.4.2 中运行良好的 maven 项目。
OS: Windows XP, SP2
Maven: maven-2.2.1
Java: jdk1.6.0_17
Eclipse: 3.4.2
m2e: 0.9.8
当我从 Eclipse 执行以下操作时:(1)maven clean,然后(2)maven install;
安装失败。这是日志的一部分。
[INFO] Installing C:\DLiao\Archive_Reconciler\R18\app\target\tsi-apex-reconciler-app-1.0.18.jar to C:\Documents and Settings\DLiao\.m2\repository\net\transolutions\apex\tsi-apex-reconciler-app\1.0.18\tsi-apex-reconciler-app-1.0.18.jar
[INFO] ------------------------------------------------------------------------
[INFO] Building Transolutions Apex Reconciler Web Application
[INFO]
[INFO] Id: net.transolutions.apex:tsi-apex-reconciler-web:war:1.0.18
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[tsi-apex-reconciler-web] in [C:\DLiao\Archive_Reconciler\R18\web\target\tsi-apex-reconciler-web-1.0.18]
[INFO] Processing war project
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Transolutions Apex Reconciler ......................... SUCCESS [0.672s]
[INFO] Transolutions Apex Reconciler Data Layer .............. SUCCESS [1.672s]
[INFO] Transolutions Apex Reconciler Render Service Client ... SUCCESS [0.188s]
[INFO] Transolutions Apex Reconciler Application Layer ....... SUCCESS [1.250s]
[INFO] Transolutions Apex Reconciler Web Application ......... FAILED [1.718s]
[INFO] ------------------------------------------------------------------------
[ERROR]
*The following mojo encountered an error while executing:
Group-Id: org.apache.maven.plugins
Artifact-Id: maven-war-plugin
Version: 2.1-alpha-1
Mojo: war
brought in via: packaging: war
While building project:
Group-Id: net.transolutions.apex
Artifact-Id: tsi-apex-reconciler-web
Version: 1.0.18
From file: C:\DLiao\Archive_Reconciler\R18\web\pom.xml
Reason: Failed to copy file for artifact[active project artifact:
artifact = net.transolutions.apex:tsi-apex-reconciler-app:jar:1.0.18:compile;
project: MavenProject: net.transolutions.apex:tsi-apex-reconciler-app:1.0.18 @ C:\DLiao\Archive_Reconciler\
R18\app\pom.xml]*
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run with the -e flag
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILED
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Wed Jan 02 14:14:19 CST 2013
[INFO] Final Memory: 3M/20M
[INFO] ------------------------------------------------------------------------
但是,如果我从 DOS 命令行(Java JDK 1.6.0_17)运行 mvn clean install ,一切都很好,并且 .war 罚款部署在我的 ~/m2/...
这是来自命令行的日志文件。
[INFO] Installing C:\DLiao\Archive_Reconciler\R18\app\target\tsi-apex-reconciler
-app-1.0.18.jar to C:\Documents and Settings\DLiao\.m2\repository\net\transoluti
ons\apex\tsi-apex-reconciler-app\1.0.18\tsi-apex-reconciler-app-1.0.18.jar
[INFO] ------------------------------------------------------------------------
[INFO] Building Transolutions Apex Reconciler Web Application
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory C:\DLiao\Archive_Reconciler\R18\web\target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\DLiao\Archive_Reconciler\R18\web\s
rc\test\resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] No tests to run.
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] Assembling webapp[tsi-apex-reconciler-web] in [C:\DLiao\Archive_Reconcile
r\R18\web\target\tsi-apex-reconciler-web-1.0.18]
[INFO] Processing war project
[INFO] Copying webapp resources[C:\DLiao\Archive_Reconciler\R18\web\src\main\web
app]
[INFO] Webapp assembled in[1110 msecs]
[INFO] Building war: C:\DLiao\Archive_Reconciler\R18\web\target\tsi-apex-reconci
ler-web-1.0.18.war
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\DLiao\Archive_Reconciler\R18\web\target\tsi-apex-reconciler
-web-1.0.18.war to C:\Documents and Settings\DLiao\.m2\repository\net\transoluti
ons\apex\tsi-apex-reconciler-web\1.0.18\tsi-apex-reconciler-web-1.0.18.war
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Transolutions Apex Reconciler ......................... SUCCESS [1.172s]
[INFO] Transolutions Apex Reconciler Data Layer .............. SUCCESS [2.406s]
[INFO] Transolutions Apex Reconciler Render Service Client ... SUCCESS [0.328s]
[INFO] Transolutions Apex Reconciler Application Layer ....... SUCCESS [3.547s]
[INFO] Transolutions Apex Reconciler Web Application ......... SUCCESS [10.282s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17 seconds
[INFO] Finished at: Wed Jan 02 11:23:10 CST 2013
[INFO] Final Memory: 49M/254M
[INFO] ------------------------------------------------------------------------
有什么建议,请指教。
谢谢戴夫