2017-10-27 8 views
1

私はSpring Boot 2.0.0.M5アプリを持っています。私は春のツール・スイートのバージョンを使用して作成することを利用石英、:3.9.0.RELEASEコマンドラインからSpring Boot 2.0.0.M5アプリをパッケージ化する際のエラー

<dependency> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-quartz</artifactId> 
</dependency> 

が、私はそれを構築し、エラーを持っていますが、私は実行すると、エラーがどこから来るか、私は任意の手掛かりを持っていませんコマンドmvn clean packageをコマンドラインから

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project telefonicaUtils: There are test failures. 
[ERROR] 
[ERROR] Please refer to /Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils/target/surefire-reports for the individual test results. 
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream. 
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called? 
[ERROR] Command was /bin/sh -c cd /Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils && /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/bin/java -jar /Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils/target/surefire/surefirebooter5299870482700724545.jar /Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils/target/surefire 2017-10-27T11-43-54_756-jvmRun1 surefire7195528782456466016tmp surefire_03680109476808337424tmp 
[ERROR] Process Exit Code: 0 
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? 
[ERROR] Command was /bin/sh -c cd /Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils && /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre/bin/java -jar /Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils/target/surefire/surefirebooter5299870482700724545.jar /Users/lopes/Documents/workspace-sts-3.9.0.RELEASE/telefonicaUtils/target/surefire 2017-10-27T11-43-54_756-jvmRun1 surefire7195528782456466016tmp surefire_03680109476808337424tmp 
[ERROR] Process Exit Code: 0 
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:686) 
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:535) 
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:280) 
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245) 
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124) 
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954) 
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832) 
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) 
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) 
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) 
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) 
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) 
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) 
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) 
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) 
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) 
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498) 
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 
[ERROR] -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

と私がアプリで持っている唯一のテスト。これは、1:作業

@RunWith(SpringRunner.class) 
@SpringBootTest 
public class TelefonicaUtilsApplicationTests { 

    @Test 
    public void contextLoads() { 
    } 

} 

だけmvn cleanそのをやって細かい

私もこのエラーでmvn clean install -XX:-UseLoopPredicateを試してみました:

[ERROR] No plugin found for prefix 'X' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/lopes/.m2/repository), spring-snapshots (https://repo.spring.io/snapshot), spring-milestones (https://repo.spring.io/milestone), central (https://repo.maven.apache.org/maven2)] -> [Help 1] 
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'X' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/lopes/.m2/repository), spring-snapshots (https://repo.spring.io/snapshot), spring-milestones (https://repo.spring.io/milestone), central (https://repo.maven.apache.org/maven2)] 
    at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:93) 
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:266) 
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:220) 
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103) 
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83) 
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89) 
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) 
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) 
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) 
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) 
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) 
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 

私もとのpom.xmlでこれを追加しようとしました同じエラー

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-surefire-plugin</artifactId> 
    <configuration> 
     <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine> 
    </configuration> 
</plugin> 

これはJavaバージョンです:

java version "1.8.0_151" 
Java(TM) SE Runtime Environment (build 1.8.0_151-b12) 
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode) 
+1

非常に古いJVMバージョン... 144は最新で次のバージョンです(162 ear accessがアナウンスされています)...以前のバージョンのmaven-surefire-plugin(2.19.1)を使用することにチェックしましたか? – khmarbaise

+0

Javaバージョンが1.8.0_151に更新されました –

+0

@khmarbaise、回答に変換してください –

答えて

1

ログによる問題は、maven-surefire-pluginに関連していないようです。ログ(jdk1.8.0_77)と明示的に指定されたJavaバージョン(1.8.0_151)には矛盾があるようですが。

最新のJavaバージョンも使用するように、マシンのmaven設定を更新する必要があります。


ちょうどそれがコードを実行/コンパイル関与していないので、コマンドmvn cleanが正常に実行することができ、情報に追加します。 Mavenのコマンドライン上-XXとしてそのような引数フラグがないので、本質的に

remove all files generated by the previous build


実行mvn clean install -XX:-UseLoopPredicate次のコマンドは、は、に失敗Maven - Introduction to the lifecycle

the clean lifecycle handles project cleaning

から

。代わりに、試用の目的であると思われるものについては、Is there a way to pass jvm args via command line to maven?をご覧ください。

関連する問題