我有两个简单的弹簧项目,两个都在团队城市建造得很好。然后我添加了一个父pom.xml:
<project 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.abcd</groupId>
<artifactId>MainProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>employee</module>
<module>SpringOne</module>
</modules>
</project>
然后在employee和SpringOne pom.xml文件中,我添加了父标记: MainProject com.abc 1.0-SNAPSHOT
新的pom文件可以从命令行构建。但是当我把它移到teamcity时,我看到了-X -e选项的错误:
[16:53:17][Step 1/1] Caused by: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
[16:53:17][Step 1/1] at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.close(ForkClient.java:257)
[16:53:17][Step 1/1] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:301)
[16:53:17][Step 1/1] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:116)
[16:53:17][Step 1/1] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:740)
[16:53:17][Step 1/1] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAllProviders(AbstractSurefireMojo.java:682)
[16:53:17][Step 1/1] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:648)
[16:53:17][Step 1/1] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:586 )
[16:53:17][Step 1/1] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
[16:53:17][Step 1/1] ... 20 more
[16:53:17][Step 1/1] [main] ERROR org.apache.maven.cli.MavenCli -
[16:53:17][Step 1/1] [main] ERROR org.apache.maven.cli.MavenCli -
[16:53:17][Step 1/1] [main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[16:53:17][Step 1/1] [main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[16:53:17][Step 1/1] [main] ERROR org.apache.maven.cli.MavenCli -
[16:53:17][Step 1/1] [main] ERROR org.apache.maven.cli.MavenCli - After correcting the problems, you can resume the build with the command
[16:53:17][Step 1/1] [main] ERROR org.apache.maven.cli.MavenCli - mvn <goals> -rf :employee
我尝试在teamcity中构建修改后的员工pom.xml,得到了类似的错误:
[com.abc:employee]无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12.4:项目员工的测试(默认测试):目标组织的执行默认测试。 apache.maven.plugins:maven-surefire-plugin:2.12.4:测试失败:分叉的虚拟机终止而没有说再见。 VM崩溃或System.exit调用