Jhipster Prod构建失败

时间:2018-08-02 14:32:20

标签: java spring maven webpack jhipster

当我尝试运行命令时:mvnw -Pprod软件包-DskipTests -e我收到此错误:

  

org.apache.maven.lifecycle.LifecycleExecutionException:失败   执行目标com.github.eirslett:frontend-maven-plugin:1.6:yarn   (webpack build prod)在项目2-g-hub上:无法在以下位置运行任务   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)   在   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)   在   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)   在   org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)   在   org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)   在   org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)   在   org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)   在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)处   org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)在   org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)在   org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)在   org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)在   org.apache.maven.cli.MavenCli.main(MavenCli.java:191)在   sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)位于   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)   在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   在java.lang.reflect.Method.invoke(Method.java:498)在   org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)   在   org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)   在   org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)   在   org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)   在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)   在   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   在java.lang.reflect.Method.invoke(Method.java:498)在   org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)   在   org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)   在   org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)   引起原因:org.apache.maven.plugin.MojoFailureException:运行失败   在的任务   com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:100)   在   org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)   在   org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)   ... 27更多原因:   com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException:   “ yarn run webpack:prod”失败。在   com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute(YarnTaskExecutor.java:64)   在   com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute(YarnMojo.java:65)   在   com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:94)   ... 29更多原因:   com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutionException:   org.apache.commons.exec.ExecuteException:进程退出并显示   错误:1(退出值:1)在   com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute(ProcessExecutor.java:82)   在   com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.executeAndRedirectOutput(ProcessExecutor.java:64)   在   com.github.eirslett.maven.plugins.frontend.lib.YarnExecutor.executeAndRedirectOutput(YarnExecutor.java:28)   在   com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute(YarnTaskExecutor.java:58)   ... 31更多原因:org.apache.commons.exec.ExecuteException:   进程退出并出现以下错误:1(退出值:1)   org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)   在   org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)   在   com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.execute(ProcessExecutor.java:74)   ...另外34个

1 个答案:

答案 0 :(得分:0)

尝试命令:

yarn webpack:prod

显示真正的问题。