我有一个包含几个模块的maven项目.在Eclipse(Juno,m2e)中,似乎编译得很好.但是当我在其中一个模块上进行maven安装时,构建会立即失败.
父母pom:
<groupId>com.sw.system4</groupId>
<artifactId>system4-parent</artifactId>
<version>${system4.version}</version>
<packaging>pom</packaging>
<name>System 4 Parent Project</name>
<modules>
<module>system4-data</module>
...others...
</modules>
<properties>
<system4.version>0.0.1-SNAPSHOT</system4.version>
<spring.version>3.2.3.RELEASE</spring.version>
... others...
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<scope>runtime</scope>
</dependency>
... lots of others ...
</dependencies>
</dependencyManagement>
Run Code Online (Sandbox Code Playgroud)
儿童pom:
<parent>
<groupId>com.sw.system4</groupId>
<artifactId>system4-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>system4-data</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<scope>runtime</scope>
</dependency>
... lots of others...
</dependencies>
Run Code Online (Sandbox Code Playgroud)
当我构建时,我得到以下输出:
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.sw.system4:system4-data:0.0.1-SNAPSHOT (C:\work\eclips
e_workspaces\systemiv\system4-parent\system4-data\pom.xml) has 8 errors
[ERROR] 'dependencies.dependency.version' for org.springframework:spring-cor
e:jar …Run Code Online (Sandbox Code Playgroud) 我在服务器上使用Jenkins - > Tomcat 7的CI部署的Java Wicket应用程序.在我尝试通过浏览器访问应用程序(通过管理器应用程序中已部署应用程序的列表)之前,一切似乎都很好.然后我收到404错误.在日志中,我可以从tomcat7-stdout-.log中看到应用程序启动正常 - 我设置的spring bean正在从我的代码中输出init调试语句,所以它看起来准备好没有错误.
我的开发机器是32位win7.该服务器是64位Win Server 2008 R2
认为它可能是Jenkins构建war文件的方式,或32/64位版本之间的不兼容性,我在本地安装了Tomcat 7,所以它都在同一台机器上,当我从管理器应用程序部署时,我得到相同的结果.
<Context path="/system4" />inside 创建META-INF/context.xml 也不会影响部署(即它仍然表示它位于war名称指定的路径上).localhost..log:
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 01, 2013 11:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@46128d')
Run Code Online (Sandbox Code Playgroud)
localhost_access_log.log:
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/html/list?org.apache.catalina.filters.CSRF_NONCE=DBBBE417970CCAAB039E98C236CB177A HTTP/1.1" 200 15822
127.0.0.1 - tomcatgui [01/Jul/2013:11:48:11 +0100] "GET /manager/images/asf-logo.gif HTTP/1.1" …Run Code Online (Sandbox Code Playgroud)