首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven-Plugin:无法运行任务“纱线”

Maven-Plugin:无法运行任务“纱线”
EN

Stack Overflow用户
提问于 2017-10-20 08:12:41
回答 1查看 8.1K关注 0票数 1

构建项目和运行前端插件会导致运行任务失败。

规格:

  • Node.js 6.11.4
  • 国家预防机制3.10.10
  • 纱线1.2.1
  • Maven 3.3.9 (3.5.0)
  • 操作系统: Windows 10 64位和Ubuntu 16.10

这就是日志的样子:

代码语言:javascript
复制
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (frontend: execute yarn install) on project zanata-frontend: Failed to run task: 'yarn ' failed. (error code 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (frontend: execute yarn install) on project zanata-frontend: Failed to run task
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject(SmartBuilderImpl.java:334)
        at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run(SmartBuilderImpl.java:104)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task
        at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:95)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 10 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'yarn ' failed. (error code 1)
        at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute(YarnTaskExecutor.java:61)
        at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute(YarnMojo.java:65)
        at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
        ... 12 more
[ERROR]
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :zanata-frontend

前端maven插件:

代码语言:javascript
复制
          <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <executions>
          <!-- Download all dependency modules from yarn (or mirror). -->
          <execution>
            <id>frontend: execute yarn install</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>yarn</goal>
            </goals>
            <configuration>
              <workingDirectory>${frontend.build.directory}</workingDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
EN

回答 1

Stack Overflow用户

发布于 2017-10-26 12:28:20

也有同样的问题。将前端maven插件从1.6升级到1.4解决了我的问题。不太清楚根本的问题。试试看。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46844905

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档