0

Can someone help please I'm running nodejs project on jenkins and I got this error :

[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

I tried to delete folder C:\Users\sam\.m2\repository\org\apache\maven\plugins\maven-resources-plugin but it doesn't work. I also tried this solution but it doesn't work.

Community
  • 1
  • 1
aicha
  • 63
  • 1
  • 11
  • Can you try with the `-U` switch added, like shown here? http://stackoverflow.com/questions/4701532/force-maven-update – Tunaki Aug 08 '16 at 09:19
  • Thks for your answer. I tried this command : mvn clean install -U like suggest in your link but I got the same error – aicha Aug 08 '16 at 09:28
  • This is not possible. The `-U` switch resolves *update interval of ... has elapsed or updates are forced* so you cannot have the same error. Please post the nex error after that. – Tunaki Aug 08 '16 at 09:39
  • I really got the same error you can see this output I printed my maven command :Running in /var/lib/jenkins/workspace/node/node-Build on demand/trunk [Pipeline] { [Pipeline] sh [trunk] Running shell script + mvn clean install -U [INFO] Scanning for projects... – aicha Aug 08 '16 at 09:47
  • It is impossible for that error: *[ERROR] ... Failure to find org.apache.maven.plugins:maven-resources-plugin:jar:2.8-beta in ... 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]* to be there with the `-U` flag. Not possible since it is the purpose of this flag to resolve it. Can you paste your new logs with this flag added? – Tunaki Aug 08 '16 at 09:58
  • Oh sorry you are right I got this error : [ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.8-beta or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.8-beta in node-js-project-local-plugin-repo (file:///var/lib/jenkins/workspace/node/node-Build on demand/trunk/server/test-project-appli/../../../repository/maven) -> – aicha Aug 08 '16 at 10:00
  • Well it looks like you configured your Maven project to fetch only dependencies from a local repo, and that dependency isn't there, so it fails. Question is: why are you not fetching from Maven central? – Tunaki Aug 08 '16 at 10:02
  • I don't really know the difference – aicha Aug 08 '16 at 10:07
  • Is it possible to find it from maven central and register it in my local repo ? – aicha Aug 08 '16 at 10:09
  • @Tunaki are you there ? :) – aicha Aug 08 '16 at 11:41
  • do you have any profile in your settings.xml or in you pom.xml – Inforedaster Aug 08 '16 at 13:27
  • Here is a part of my pom.xml : – aicha Aug 08 '16 at 13:32
  • prod true prod tu false tu unit – aicha Aug 08 '16 at 13:33
  • are you sure with this plugin version 2.8-beta look at my answer update for link – Inforedaster Aug 08 '16 at 15:23

1 Answers1

0

if you use -P nexus to Maven which means "there is a profile called nexus; find it and activate it". Check your environment and your settings.xml for this flag and also look at all elements inside the various XML files

i think you have a profile named nexus if it's true do that :

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

Usually, mvn help:effective-pom is also useful to see what the real POM would look like.

So,

i can't find maven-resources-plugin with 2.8-beta version can you look at maven repo in the link below and use the appropriate version of your plugin and retry.

maven-resources-plugin

Inforedaster
  • 1,260
  • 1
  • 23
  • 39