1

我有两个简单的春季项目,都建立在 teamcity 上。然后我添加了一个父 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>

然后在员工和 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:test (default-test):执行目标 org.apache.maven 的默认测试.plugins:maven-surefire-plugin:2.12.4:test failed: 分叉的虚拟机没有说再见就终止了。VM 崩溃或调用 System.exit

4

0 回答 0