在jenkins上运行nodejs项目时出错

时间:2016-08-08 09:14:11

标签: node.js maven jenkins

有人可以帮助我,我正在jenkins上运行nodejs项目,我收到了这个错误:

[INFO] Building node-js-project::server::node-js-project-appli 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.8-beta is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] node-js-project .................................... SUCCESS [  1.002 s]
[INFO] node-js-project::delivery .......................... SUCCESS [  3.013 s]
[INFO] node-js-project::server ............................ SUCCESS [  0.256 s]
[INFO] node-js-project::server::node-js-project-appli ..... FAILURE [  0.101 s]
[INFO] node-js-project::common ............................ SKIPPED
[INFO] node-js-project::common::vertxstub ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.983 s
[INFO] Finished at: 2016-08-08T10:54:17+02:00
[INFO] Final Memory: 11M/28M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "nexus" could not be activated because it does not exist.
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.8-beta or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-resources-plugin:jar:2.8-beta in file:///var/lib/jenkins/workspace/node/node-Build on demand/trunk/server/test-project-appli/../../../repository/maven was cached in the local repository, resolution will not be reattempted until the update interval of node-js-project-local-plugin-repo has elapsed or updates are forced -> [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/PluginResolutionException
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

我尝试删除文件夹C:\Users\sam\.m2\repository\org\apache\maven\plugins\maven-resources-plugin,但它不起作用。 我也试过了this solution,但它不起作用。

1 个答案:

答案 0 :(得分:0)

如果您使用-P nexus到Maven,这意味着"有一个名为nexus的配置文件;找到并激活它"。检查环境和settings.xml以获取此标志,并查看各种XML文件中的所有元素

我认为你有一个名为nexus的个人资料,如果它真的这样做:

<activeProfiles>
  <activeProfile>nexus</activeProfile>
</activeProfiles>

通常,mvn help:effective-pom对于查看真实POM的外观也很有用。

所以,

我无法找到具有2.8-beta版本的maven-resources-plugin,您可以在下面的链接中查看maven repo并使用相应版本的插件重试。

maven-resources-plugin