Maven 401 unauthorized when deploying on archiva - maven

I'm getting a "401 unauthorized" error from Apache Archiva repository when I try to deploy from a Maven build.
When using Maven 3.1.1 or lower it's working fine, I can deploy snapshots or releases on the Archiva repo. As soon as i'm using Maven 3.2.1 or greater, it's not working anymore. By looking at the release notes I could not figure out what could cause that.
Downloading from the repo is fine
Uploading on the repo results in 401 unauthorized
The users are declared in the settings.xml file in the .m2 folder
No proxy settings
Here is the debug trace of the deploy that's failing :
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) # Xplugin ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=32, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=14, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=32, DefaultDependencyCollector.collectTime=3, DefaultDependencyCollector.transformTime=0}
[DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:2.7:
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-project:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-settings:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG] junit:junit:jar:3.8.1:compile
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG] org.apache.maven:maven-model:jar:2.0.6:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.6:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.5.6:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7
[DEBUG] Included: org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
[DEBUG] Included: junit:junit:jar:3.8.1
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.6
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.6
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.6
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.6
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-deploy-plugin:2.7, parent: sun.misc.Launcher$AppClassLoader#55f96302]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy' with basic configurator -->
[DEBUG] (f) artifact = com.application.pdfplugins:Xplugin:jar:3.1.0-00-SNAPSHOT
[DEBUG] (f) attachedArtifacts = []
[DEBUG] (s) localRepository = id: local
url: file:///C:/Users/bamboo/.m2/repository/
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => true, update => always]
[DEBUG] (f) offline = false
[DEBUG] (f) packaging = jar
[DEBUG] (f) pomFile = C:bamboo\xml-data\build-dir\26771457\PDFPLUGINS-XAS4-JOB1\Xplugin\dependency-reduced-pom.xml
[DEBUG] (f) project = MavenProject: com.application.pdfplugins:Xplugin:3.1.0-00-SNAPSHOT # C:bamboo\xml-data\build-dir\26771457\PFPLUGIN-X-JOB1\Xplugin\dependency-reduced-pom.xml
[DEBUG] (f) retryFailedDeploymentCount = 1
[DEBUG] (f) skip = false
[DEBUG] (f) updateReleaseInfo = false
[DEBUG] -- end configuration --
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://maven-dev.org/repository/built-artifacts/
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://maven-dev.org/repository/built-artifacts/ with username=writer, password=***
[INFO] Downloading: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/maven-metadata.xml (390 B at 11.5 KB/sec)
[DEBUG] Writing tracking file C:\Users\bamboo\.m2\repository\com\application\pdfplugins\Xplugin\3.1.0-00-SNAPSHOT\resolver-status.properties
[INFO] Uploading: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar
[INFO] Uploading: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:06 min
[INFO] Finished at: 2018-06-04T17:21:36+02:00
[INFO] Final Memory: 39M/592M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project Xplugin: Failed to deploy artifacts: Could not transfer artifact com.application.pdfplugins:Xplugin:jar:3.1.0-00-20180604.152136-4 from/to built-artifacts (https://maven-dev.org/repository/built-artifacts/): Failed to transfer file: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project Xplugin: Failed to deploy artifacts: Could not transfer artifact com.application.pdfplugins:Xplugin:jar:3.1.0-00-20180604.152136-4 from/to built-artifacts (https://maven-dev.org/repository/built-artifacts/): Failed to transfer file: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar. Return code is: 401, ReasonPhrase: Unauthorized.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact com.application.pdfplugins:Xplugin:jar:3.1.0-00-20180604.152136-4 from/to built-artifacts (https://maven-dev.org/repository/built-artifacts/): Failed to transfer file: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar. Return code is: 401, ReasonPhrase: Unauthorized.
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:193)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.application.pdfplugins:Xplugin:jar:3.1.0-00-20180604.152136-4 from/to built-artifacts (https://maven-dev.org/repository/built-artifacts/): Failed to transfer file: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar. Return code is: 401, ReasonPhrase: Unauthorized.
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143)
at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:167)
at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:157)
... 21 more
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.application.pdfplugins:Xplugin:jar:3.1.0-00-20180604.152136-4 from/to built-artifacts (https://maven-dev.org/repository/built-artifacts/): Failed to transfer file: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar. Return code is: 401, ReasonPhrase: Unauthorized.
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:317)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:245)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:413)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139)
... 23 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.application.pdfplugins:Xplugin:jar:3.1.0-00-20180604.152136-4 from/to built-artifacts (https://maven-dev.org/repository/built-artifacts/): Failed to transfer file: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar. Return code is: 401, ReasonPhrase: Unauthorized.
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:274)
at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:311)
... 26 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://maven-dev.org/repository/built-artifacts/com/application/pdfplugins/Xplugin/3.1.0-00-SNAPSHOT/Xplugin-3.1.0-00-20180604.152136-4.jar. Return code is: 401, ReasonPhrase: Unauthorized.
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:642)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:557)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:539)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:533)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:513)
at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:644)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:410)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:510)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 28 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/MojoExecutionException
Failing task since return code of [C:\Maven_3.2.5\bin\mvn.bat --batch-mode -Djava.io.tmpdir=D:\Apps\Bamboo\temp\PDFPLUGINS-XAS4-JOB1 -e -Xclean package deploy -DskipTests=true] was 1 while expected 0
As you can see the username and password are correctly retrieved by maven (username=writer, password=***) but I get the 401 anyway.
The only difference that I could see between Maven 3.1.1 and 3.2.1 is that the first is using "WagonRepositoryConnector" and the second is using "BasicRepositoryConnector"
I searched for the differences between the two or how could I force Wagonrepositoryconnector but did no find relevant information.
Does somebody have an idea of what could prevent version 3.2.1 and greater to deploy the artifacts? it looks like the credentials are messed up with the newer versions of Maven.
EDIT 1
After further debug i was able to understand that the faulty component was "wagon-http" which is upgraded to v 2.6 in Maven 3.2.1.
Specifying the wagon-http to use in the pom.xml is the only workaround I could find for the moment :
in the pom.xml inside the build section i added :
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>2.5</version>
</extension>
</extensions>
It's the last version working.
In the Wagon 2.6 release note there is "Upgrade Apache HttpClient based wagon provider to HttpClient 4.3". I suspect that the problem lies here so I tried a few things :
I disabled all the SSL security (even if there were no SSL error message but you never know it can be wrapped in a 401 unauthorized with no further explanation) but it still failed.
I disabled the authentication on my repository and I was able to upload the artifact
This last statement makes me think that the authentication is mishandled by the httpclient 4.3 (or maybe another component of wagon-http).
I don't understand what could cause this, if somebody has something to try I'll be glad to test it.

Related

maven-dependency-plugin:2.8:copy - can't find artifact

I am trying to download an artifact from a Nexus server on Ubuntu 14.04, but maven can't find it:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli) on project standalone-pom: Unable to find artifact.
On my local OS X machine, it works just fine and downloads the expected artifacts:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy -X -Dartifact=com.myserver.myapp:myapp-backend:LATEST -DoutputDirectory=./ -Dmdep.useBaseVersion=true
Which outputs the following
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-31-generic", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml
[DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for /root/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[DEBUG] Using mirror nexus (https://test.myserver.com:8443/repository/maven-public) for apache.snapshots (http://repository.apache.org/snapshots).
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: org.apache.maven:standalone-pom:pom:1
[DEBUG] Tasks: [org.apache.maven.plugins:maven-dependency-plugin:2.8:copy]
[DEBUG] Style: Aggregating
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: org.apache.maven:standalone-pom:1
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): []
[DEBUG] Repositories (dependencies): [nexus (https://test.myserver.com:8443/repository/maven-public, releases)]
[DEBUG] Repositories (plugins) : [nexus (https://test.myserver.com:8443/repository/maven-public, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<artifact>${artifact}</artifact>
<local default-value="${localRepository}"/>
<outputAbsoluteArtifactFilename default-value="false">${outputAbsoluteArtifactFilename}</outputAbsoluteArtifactFilename>
<outputDirectory default-value="${project.build.directory}/dependency">${outputDirectory}</outputDirectory>
<overWriteIfNewer default-value="true">${mdep.overIfNewer}</overWriteIfNewer>
<overWriteReleases default-value="false">${mdep.overWriteReleases}</overWriteReleases>
<overWriteSnapshots default-value="false">${mdep.overWriteSnapshots}</overWriteSnapshots>
<prependGroupId default-value="false">${mdep.prependGroupId}</prependGroupId>
<reactorProjects default-value="${reactorProjects}"/>
<remoteRepos default-value="${project.remoteArtifactRepositories}"/>
<silent default-value="false">${silent}</silent>
<skip default-value="false">${mdep.skip}</skip>
<stripClassifier default-value="false">${mdep.stripClassifier}</stripClassifier>
<stripVersion default-value="false">${mdep.stripVersion}</stripVersion>
<useBaseVersion default-value="false">${mdep.useBaseVersion}</useBaseVersion>
<project default-value="${project}"/>
</configuration>
[DEBUG] =======================================================================
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (default-cli) # standalone-pom ---
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
... some imports ...
[DEBUG] org.apache.maven.plugins:maven-dependency-plugin:jar:2.8:
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-project:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-settings:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-model:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-core:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-error-diagnostics:jar:2.0.9:compile
[DEBUG] commons-cli:commons-cli:jar:1.0:compile
[DEBUG] org.apache.maven:maven-plugin-descriptor:jar:2.0.9:compile
[DEBUG] org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile
[DEBUG] org.apache.maven:maven-monitor:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.9:compile
[DEBUG] org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile
[DEBUG] org.apache.maven.reporting:maven-reporting-impl:jar:2.0.5:compile
[DEBUG] org.apache.maven.doxia:doxia-core:jar:1.0:compile
[DEBUG] org.apache.maven.shared:maven-doxia-tools:jar:1.0.2:compile
[DEBUG] commons-io:commons-io:jar:1.4:compile
[DEBUG] commons-validator:commons-validator:jar:1.2.0:compile
[DEBUG] commons-beanutils:commons-beanutils:jar:1.7.0:compile
[DEBUG] commons-digester:commons-digester:jar:1.6:compile
[DEBUG] commons-logging:commons-logging:jar:1.0.4:compile
[DEBUG] oro:oro:jar:2.0.8:compile
[DEBUG] xml-apis:xml-apis:jar:1.0.b2:compile
[DEBUG] org.apache.maven.doxia:doxia-sink-api:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-site-renderer:jar:1.0:compile
[DEBUG] org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile
[DEBUG] org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile
[DEBUG] org.apache.velocity:velocity:jar:1.5:compile
[DEBUG] org.apache.maven.doxia:doxia-decoration-model:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-apt:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-fml:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-xdoc:jar:1.0:compile
[DEBUG] org.apache.maven.doxia:doxia-module-xhtml:jar:1.0:compile
[DEBUG] org.codehaus.plexus:plexus-archiver:jar:2.3:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.9:compile
[DEBUG] org.apache.maven.shared:file-management:jar:1.2.1:compile
[DEBUG] org.apache.maven.shared:maven-shared-io:jar:1.1:compile
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG] junit:junit:jar:3.8.1:compile
[DEBUG] org.codehaus.plexus:plexus-io:jar:2.0.6:compile
[DEBUG] org.apache.maven.shared:maven-dependency-analyzer:jar:1.4:compile
[DEBUG] asm:asm:jar:3.3.1:compile
[DEBUG] org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG] org.apache.maven.shared:maven-dependency-tree:jar:2.1:compile
[DEBUG] org.eclipse.aether:aether-util:jar:0.9.0.M2:compile
[DEBUG] org.apache.maven.shared:maven-common-artifact-filters:jar:1.4:compile
[DEBUG] org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
[DEBUG] commons-lang:commons-lang:jar:2.6:compile
[DEBUG] commons-collections:commons-collections:jar:3.2.1:compile
[DEBUG] classworlds:classworlds:jar:1.1:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8
[DEBUG] Included: org.apache.maven.plugins:maven-dependency-plugin:jar:2.8
[DEBUG] Included: commons-cli:commons-cli:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
[DEBUG] Included: org.apache.maven.reporting:maven-reporting-api:jar:3.0
[DEBUG] Included: org.apache.maven.reporting:maven-reporting-impl:jar:2.0.5
[DEBUG] Included: org.apache.maven.doxia:doxia-core:jar:1.0
[DEBUG] Included: org.apache.maven.shared:maven-doxia-tools:jar:1.0.2
[DEBUG] Included: commons-io:commons-io:jar:1.4
[DEBUG] Included: commons-validator:commons-validator:jar:1.2.0
[DEBUG] Included: commons-beanutils:commons-beanutils:jar:1.7.0
[DEBUG] Included: commons-digester:commons-digester:jar:1.6
[DEBUG] Included: commons-logging:commons-logging:jar:1.0.4
[DEBUG] Included: oro:oro:jar:2.0.8
[DEBUG] Included: xml-apis:xml-apis:jar:1.0.b2
[DEBUG] Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-site-renderer:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7
[DEBUG] Included: org.codehaus.plexus:plexus-velocity:jar:1.1.7
[DEBUG] Included: org.apache.velocity:velocity:jar:1.5
[DEBUG] Included: org.apache.maven.doxia:doxia-decoration-model:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-apt:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-fml:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-xdoc:jar:1.0
[DEBUG] Included: org.apache.maven.doxia:doxia-module-xhtml:jar:1.0
[DEBUG] Included: org.codehaus.plexus:plexus-archiver:jar:2.3
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:3.0.9
[DEBUG] Included: org.apache.maven.shared:file-management:jar:1.2.1
[DEBUG] Included: org.apache.maven.shared:maven-shared-io:jar:1.1
[DEBUG] Included: junit:junit:jar:3.8.1
[DEBUG] Included: org.codehaus.plexus:plexus-io:jar:2.0.6
[DEBUG] Included: org.apache.maven.shared:maven-dependency-analyzer:jar:1.4
[DEBUG] Included: asm:asm:jar:3.3.1
[DEBUG] Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG] Included: org.apache.maven.shared:maven-dependency-tree:jar:2.1
[DEBUG] Included: org.eclipse.aether:aether-util:jar:0.9.0.M2
[DEBUG] Included: org.apache.maven.shared:maven-common-artifact-filters:jar:1.4
[DEBUG] Included: org.apache.maven.shared:maven-invoker:jar:2.0.11
[DEBUG] Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Included: commons-collections:commons-collections:jar:3.2.1
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-core:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-monitor:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9
[DEBUG] Excluded: org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG] Excluded: classworlds:classworlds:jar:1.1
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-dependency-plugin:2.8:copy from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-dependency-plugin:2.8, parent: sun.misc.Launcher$AppClassLoader#5c647e05]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.8:copy' with basic configurator -->
[DEBUG] (s) artifact = ch.myserver.myapp:myapp-backend:LATEST
[DEBUG] (s) local = id: local
url: file:///root/.m2/repository/
layout: none
[DEBUG] (f) outputAbsoluteArtifactFilename = false
[DEBUG] (s) outputDirectory = /home/nino
[DEBUG] (s) overWriteIfNewer = true
[DEBUG] (s) overWriteReleases = false
[DEBUG] (s) overWriteSnapshots = false
[DEBUG] (f) prependGroupId = false
[DEBUG] (f) reactorProjects = [MavenProject: org.apache.maven:standalone-pom:1 # ]
[DEBUG] (s) remoteRepos = [ id: nexus
url: https://test.myserver.com:8443/repository/maven-public
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => daily]
]
[DEBUG] (f) silent = false
[DEBUG] (s) skip = false
[DEBUG] (s) stripClassifier = false
[DEBUG] (s) stripVersion = false
[DEBUG] (s) useBaseVersion = true
[DEBUG] (f) project = MavenProject: org.apache.maven:standalone-pom:1 #
[DEBUG] -- end configuration --
[INFO] Configured Artifact: ch.myserver.myapp:myapp-backend:LATEST:jar
[DEBUG] Could not find metadata ch.myserver.myapp:myapp-backend/maven-metadata.xml in local (/root/.m2/repository)
[DEBUG] Skipped remote update check for ch.myserver.myapp:myapp-backend/maven-metadata.xml, locally cached metadata up-to-date.
[DEBUG] Could not find metadata ch.myserver.myapp:myapp-backend:1.0-SNAPSHOT/maven-metadata.xml in local (/root/.m2/repository)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.090s
[INFO] Finished at: Wed Nov 15 10:01:44 CET 2017
[INFO] Final Memory: 9M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli) on project standalone-pom: Unable to find artifact. Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]
[ERROR] ch.myserver.myapp:myapp-backend:jar:LATEST
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] nexus (https://test.myserver.com:8443/repository/maven-public, releases=true, snapshots=false)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:copy (default-cli) on project standalone-pom: Unable to find artifact.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to find artifact.
at org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo.getArtifact(AbstractFromConfigurationMojo.java:265)
at org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo.getProcessedArtifactItems(AbstractFromConfigurationMojo.java:171)
at org.apache.maven.plugin.dependency.fromConfiguration.CopyMojo.doExecute(CopyMojo.java:105)
at org.apache.maven.plugin.dependency.AbstractDependencyMojo.execute(AbstractDependencyMojo.java:167)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=ch.myserver.myapp -DartifactId=myapp-backend -Dversion=LATEST -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
ch.myserver.myapp:myapp-backend:jar:LATEST
from the specified remote repositories:
nexus (https://test.myserver.com:8443/repository/maven-public, releases=true, snapshots=false)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:219)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:157)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:525)
at org.apache.maven.plugin.dependency.fromConfiguration.AbstractFromConfigurationMojo.getArtifact(AbstractFromConfigurationMojo.java:257)
... 24 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:213)
... 27 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact ch.myserver.myapp:myapp-backend:jar:LATEST
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:528)
... 31 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/MojoExecutionException
My settings.xml in /root/.m2/:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>snapshots</id>
<username>myusername</username>
<password>mypassword</password>
</server>
<server>
<id>releases</id>
<username>myusername</username>
<password>mypassword</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<url>https://test.myserver.com:8443/repository/maven-public</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>
I also tried to specify the exact version instead of LATEST, but that does not work either.
Am I missing some files or configurations, or what may the problem be here?
I found a solution. I needed to pass -U:
-U,--update-snapshots Forces a check for missing
releases and updated snapshots on
remote repositories
So:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy -X -U -Dartifact=com.myserver.myapp:myapp-backend:LATEST -DoutputDirectory=./ -Dmdep.useBaseVersion=true

mvn clean failure hold by windows process

How to know which windows processes are holding the folders while doing "mvn clean" results in failure ?
I suspect some unknown process are holding my "target" folder, which is stopping me to proceed further
Is there any way to find that unknown process ?
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-clean-plugin:2.5:clean from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-clean-plugin:2.5, parent: sun.misc.Launcher$AppClassLoader#2d4b1fda]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.5:clean' with basic configurator -->
[DEBUG] (f) directory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
[DEBUG] (f) excludeDefaultDirectories = false
[DEBUG] (f) failOnError = true
[DEBUG] (f) followSymLinks = false
[DEBUG] (f) outputDirectory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target\classes
[DEBUG] (f) reportDirectory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target\site
[DEBUG] (f) retryOnError = true
[DEBUG] (f) skip = false
[DEBUG] (f) testOutputDirectory = C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target\test-classes
[DEBUG] -- end configuration --
[INFO] Deleting C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
[INFO] Deleting directory C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.290 s
[INFO] Finished at: 2017-08-21T15:16:16+05:30
[INFO] Final Memory: 14M/124M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project quality-manager: Failed to clean project: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project quality-manager: Failed to clean project: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to clean project: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:215)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.io.IOException: Failed to delete C:\RafiWork\TASK\French\Sprint2\pdm_sonartool\quality-manager\target
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:249)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:191)
at org.apache.maven.plugin.clean.Cleaner.delete(Cleaner.java:117)
at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:193)
I tend to get this when I've left a debugger running or the project running on a local webserver. Sometimes it can go a bit funny and hang around even when you think you've stopped it.
When that happens I usually tend to just go to task manager and kill any java processes running on my machine and it usually fixes it.
Use Handle, from Mark Russinovitch, Sysinternals (now Microsoft):
https://learn.microsoft.com/en-us/sysinternals/downloads/handle
This will help you find the offender (it's often your own Java process, or Explorer.exe, or even your CMD.EXE from where you're running Maven).

Error in `mvn jgitflow:release-finish` mutli-module build (due to wrong compilation order)

I'm trying to use JGitflow to create a release for my project. Unfortunately, when I run mvn jgitflow:release-finish, I get the following error:
Unable to find resource 'org.jorlib:jorlib-core:jar:1.0' in repository central (http://repo1.maven.org/maven2)
[WARNING] The dependency: org.jorlib:jorlib-core:jar:1.0 can't be resolved but has been found in the reactor.
I'm not sure how to resolve this. First I ran: mvn jgitflow:release-start which reported "Build Successfull". The result looks correct:
jkinable#daedalus:~/workspace/javaIDEA/jORLib/jorlib$ git branch -avv
development 07e4c1f [origin/development: ahead 3] updating poms for 1.1-SNAPSHOT development
master f3240f9 [origin/master] Updated pom.xml
*release/1.0 f3240f9 Updated pom.xml
Next I ran mvn jgitflow:release-finish which fails. It seems that it tries to download jorlib-core-1.0.jar but that is the file it is supposed to compile. Digging deeper into this, I ran mvn jgitflow:release-finish -e -X > ~/mygitflow.log
Here is part of the result:
[INFO] Building JORLib - Parent
[INFO] task-segment: [jgitflow:release-finish] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[DEBUG] org.jorlib:jorlib:pom:1.0-SNAPSHOT (selected for null)
[DEBUG] org.jorlib:jorlib-core:jar:1.0-SNAPSHOT (selected for null)
[DEBUG] junit:junit:jar:4.12:test (selected for test)
[DEBUG] Retrieving parent-POM: org.hamcrest:hamcrest-parent:pom:1.3 for project: null:hamcrest-core:jar:null from the repository.
[DEBUG] org.hamcrest:hamcrest-core:jar:1.3:test (selected for test)
[DEBUG] Retrieving parent-POM: org.jgrapht:jgrapht:pom:0.9.0 for project: null:jgrapht-core:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:jgrapht-core
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-ext:jar:0.9.0
[DEBUG] org.jgrapht:jgrapht-demo:jar:0.9.0
[DEBUG] xmlunit:xmlunit:jar:1.3:test
[DEBUG] junit:junit:jar:4.10:test
[DEBUG] org.jgrapht:jgrapht-core:jar:0.9.0:compile (selected for compile)
[DEBUG] Retrieving parent-POM: com.google.guava:guava-parent:pom:14.0.1 for project: null:guava:bundle:null from the repository.
[DEBUG] com.google.guava:guava:jar:14.0.1:compile (selected for compile)
[DEBUG] Retrieving parent-POM: ch.qos.logback:logback-parent:pom:0.9.28 for project: null:logback-classic:jar:null from the repository.
[DEBUG] Adding managed dependencies for unknown:logback-classic
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28:compile (selected for compile)
[DEBUG] Adding managed dependencies for unknown:logback-core
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28
[DEBUG] ch.qos.logback:logback-core:test-jar:tests:0.9.28
[DEBUG] ch.qos.logback:logback-classic:jar:0.9.28
[DEBUG] ch.qos.logback:logback-access:jar:0.9.28
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] janino:janino:jar:2.5.10
[DEBUG] org.codehaus.groovy:groovy-all:jar:1.7.2
[DEBUG] javax.mail:mail:jar:1.4
[DEBUG] dom4j:dom4j:jar:1.6.1
[DEBUG] hsqldb:hsqldb:jar:1.8.0.7
[DEBUG] com.h2database:h2:jar:1.2.132
[DEBUG] postgresql:postgresql:jar:8.4-701.jdbc4
[DEBUG] mysql:mysql-connector-java:jar:5.1.9
[DEBUG] org.apache.tomcat:catalina:jar:6.0.20
[DEBUG] org.mortbay.jetty:jetty:jar:6.1.1
[DEBUG] org.eclipse.jetty:jetty-server:jar:7.0.1.v20091125
[DEBUG] org.mortbay.jetty:servlet-api-2.5:jar:6.1.1
[DEBUG] org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.0
[DEBUG] javax.servlet:servlet-api:jar:2.5
[DEBUG] org.scala-lang:scala-library:jar:2.7.7
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] Retrieving parent-POM: org.slf4j:slf4j-parent:pom:1.6.1 for project: org.slf4j:slf4j-api:jar:null from the repository.
[DEBUG] Adding managed dependencies for org.slf4j:slf4j-api
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1
[DEBUG] org.slf4j:slf4j-jdk14:jar:1.6.1
[DEBUG] log4j:log4j:jar:1.2.16
[DEBUG] ch.qos.cal10n:cal10n-api:jar:0.7.4
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] ch.qos.logback:logback-core:jar:0.9.28:compile (selected for compile)
[DEBUG] org.slf4j:slf4j-api:jar:1.6.1:compile (selected for compile)
[DEBUG] WARNING: A dependency of the current project (or of one the plugins used in its build) was found in the reactor,
but had not been built at the time it was requested. It will be resolved from the repository instead.
Current Project: JORLib - Demo
Requested Dependency: org.jorlib:jorlib-core:jar:1.0-SNAPSHOT
NOTE: You may need to run this build to the 'compile' lifecycle phase, or farther, in order to build the dependency artifact.
The module jorlib-demo depends on jorlib-core, so it must first compile jorlib-core before it compiles jorlib-demo. For some reason this doesn't happen. As a result, it searches for jorlib-core in some external depository and fails eventually because it couldn't find it.
My parent pom: parent pom
The pom in jorlib-core: pom jorlib-core
The pom in jorlib-demo: pom jorlib-demo
It turns out that this problem is caused by my Maven version. My system runs Java 1.8.0_45 and Apache Maven 2.2.1 (rdebian-8). At the time of writing, the latter Maven version is shipped by default with the latest Ubuntu LTS (14.04.2) release. I have now upgraded to Apache Maven 3.2.1. After upgrading to Maven 3, I did run into the following error message while executing jgitflow:release-finish:
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/jvm/java-8-oracle/bin/java/bin/java
This effectively prohibited the code from being compiled. Notice the weird bin/java/bin/java part. I double checked my $JAVA_HOME which correctly pointed to /usr/lib/jvm/java-8-oracle/. A solution to this issue can be found here: Having JAVA_HOME inconsistency issue with maven
I simply created a file called .mavenrc in my home folder which contained: export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Now the Jgitflow plugin is working well.

Maven creating a jar package

When I run this command:
mvn -e package
I got this error:
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/local/apache-maven-3.1.1/conf/settings.xml
[DEBUG] Reading user settings from /root/.m2/settings.xml [DEBUG] Using local repository at /root/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /root/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.090s
[INFO] Finished at: Thu Apr 24 11:47:01 CEST 2014 [INFO] Final Memory: 12M/362M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in
this directory (/root/src/storm-starter). Please verify you invoked Maven from the
correct directory. -> [Help 1] org.apache.maven.lifecycle.MissingProjectException: The
goal you specified requires a project to execute but there is no POM in this directory
(/root/src/storm-starter). Please verify you invoked Maven from the correct directory.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
[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/MissingProjectException
Maven requires a file named pom.xml in the directory at which you have your project and are executing maven in.
That is the default; if you have another file as your pom.xml like you described in your comment, m2-pom.xml you'll have to inform maven about it with the -f flag.
mvn -f m2-pom.xml clean package

On a windows Jenkins slave, how can I solve "No plugin found for prefix 'http' in the current project and in the plugin groups"?

Starting yesterday, my build started o broke due to that exteremely weird error.
It happens when I launch one particular build using that particular jenkins slave.
When I launch that very build directly on that machine (that's to say using maven directly) it works without any trouble.
When i launch an other build on this slave through Jenkins, it also work correctly.
For the record, I've launched the build using the -X flag to have a better idea of what happen, and here is a part of the log being written
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:\Documents and Settings\ndx\.m2\repository)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:\Documents and Settings\ndx\.m2\repository)
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://evgeny-goldin.org/artifactory/repo/
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for https://oss.sonatype.org/content/repositories/releases/
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repository.sonatype.org/content/groups/flexgroup/
Downloading: http://evgeny-goldin.org/artifactory/repo/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/
Downloading: https://oss.sonatype.org/content/repositories/releases/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://repository.sonatype.org/content/groups/flexgroup/org/apache/maven/plugins/maven-metadata.xml
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/releases
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/releases/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots/org/apache/maven/plugins/maven-metadata.xml
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots/org/apache/maven/plugins/maven-metadata.xml (225 B at 3.5 KB/sec)
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repository.sonatype.org/content/groups/flexgroup/
Downloading: http://repository.sonatype.org/content/groups/flexgroup/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 200.4 KB/sec)
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://evgeny-goldin.org/artifactory/repo/
Downloading: http://evgeny-goldin.org/artifactory/repo/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for https://oss.sonatype.org/content/repositories/releases/
Downloading: https://oss.sonatype.org/content/repositories/releases/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repository.sonatype.org/content/groups/flexgroup/org/apache/maven/plugins/maven-metadata.xml (228 B at 0.5 KB/sec)
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/releases
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/releases/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots
Downloading: http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots/org/codehaus/mojo/maven-metadata.xml
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo.maven.apache.org/maven2
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 463.4 KB/sec)
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\apache\maven\plugins\resolver-status.properties
[DEBUG] Writing resolution tracking file C:\Documents and Settings\ndx\.m2\repository\org\codehaus\mojo\resolver-status.properties
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in evgenygoldin (http://evgeny-goldin.org/artifactory/repo/)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in sonatype-oss (https://oss.sonatype.org/content/repositories/releases/)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in evgenygoldin (http://evgeny-goldin.org/artifactory/repo/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in sonatype-oss (https://oss.sonatype.org/content/repositories/releases/)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases)
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots)
[DEBUG] Could not find metadata org.apache.maven.plugins/maven-metadata.xml in local (C:\Documents and Settings\ndx\.m2\repository)
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of 3rd-party-nexys has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in http://evgeny-goldin.org/artifactory/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of evgenygoldin has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in https://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-oss has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.apache.maven.plugins/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.apache.maven.plugins/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/releases was cached in the local repository, resolution will not be reattempted until the update interval of nexus-releases has elapsed or updates are forced
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (C:\Documents and Settings\ndx\.m2\repository)
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://repository.sonatype.org/content/groups/flexgroup/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-flexmojos has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/ was cached in the local repository, resolution will not be reattempted until the update interval of 3rd-party-nexys has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://evgeny-goldin.org/artifactory/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of evgenygoldin has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in https://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-oss has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/releases was cached in the local repository, resolution will not be reattempted until the update interval of nexus-releases has elapsed or updates are forced
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[DEBUG] Failure to find org.codehaus.mojo/maven-metadata.xml in http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of nexus-snapshots has elapsed or updates are forced
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] project.name.hidden .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.703s
[INFO] Finished at: Thu Jan 16 09:11:56 CET 2014
[INFO] Final Memory: 21M/52M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'http' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Documents and Settings\ndx\.m2\repository), sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/), 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/), evgenygoldin (http://evgeny-goldin.org/artifactory/repo/), sonatype-oss (https://oss.sonatype.org/content/repositories/releases/), nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases), nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'http' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Documents and Settings\ndx\.m2\repository), sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/), 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/), evgenygoldin (http://evgeny-goldin.org/artifactory/repo/), sonatype-oss (https://oss.sonatype.org/content/repositories/releases/), nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases), nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots), central (http://repo.maven.apache.org/maven2)]
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:94)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[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/NoPluginFoundForPrefixException
Build step 'Invoquer les cibles Maven de haut niveau' marked build as failure
I'm specially baffled by the last stack trace
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'http' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Documents and Settings\ndx\.m2\repository), sonatype-flexmojos (http://repository.sonatype.org/content/groups/flexgroup/), 3rd-party-nexys (http://nexus.server.name.hidden:8080/nexus/content/repositories/thirdparty/), evgenygoldin (http://evgeny-goldin.org/artifactory/repo/), sonatype-oss (https://oss.sonatype.org/content/repositories/releases/), nexus-releases (http://nexus.server.name.hidden:8080/nexus/content/repositories/releases), nexus-snapshots (http://nexus.server.name.hidden:8080/nexus/content/repositories/snapshots), central (http://repo.maven.apache.org/maven2)]
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:94)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
As I don't run any "http" prefixed command : the mvn command being send to slave is mvn.bat -Dos=windows -DSVN_REVISION=7436 -Dsdk=indesign-sdk -DSVN_URL=http://svn.branc.name.hidden "-Dintegration=jenkins -Djava.awt.headless=true" clean deploy -pl :project.name.hidden -am -U -X
EDIT 1 I've finally gave up simple documentation reading and jumped the direct code analysis bandwagon. That bandwagon led me to run maven in remote debugging mode (thanks to that article for the complete environment variable), which in turn led me to the method MojoDescriptorCreator#getMojoDescriptor. An excerpt from maven 3.0.4 is copied below
public MojoDescriptor getMojoDescriptor( String task, MavenSession session, MavenProject project )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
PluginVersionResolutionException
{
String goal = null;
Plugin plugin = null;
StringTokenizer tok = new StringTokenizer( task, ":" );
int numTokens = tok.countTokens();
if ( numTokens >= 4 )
{
// We have everything that we need
//
// org.apache.maven.plugins:maven-remote-resources-plugin:1.0:process
//
// groupId
// artifactId
// version
// goal
//
plugin = new Plugin();
plugin.setGroupId( tok.nextToken() );
plugin.setArtifactId( tok.nextToken() );
plugin.setVersion( tok.nextToken() );
goal = tok.nextToken();
// This won't be valid, but it constructs something easy to read in the error message
while ( tok.hasMoreTokens() )
{
goal += ":" + tok.nextToken();
}
}
else if ( numTokens == 3 )
{
// We have everything that we need except the version
//
// org.apache.maven.plugins:maven-remote-resources-plugin:???:process
//
// groupId
// artifactId
// ???
// goal
//
plugin = new Plugin();
plugin.setGroupId( tok.nextToken() );
plugin.setArtifactId( tok.nextToken() );
goal = tok.nextToken();
}
else if ( numTokens <= 2 )
{
// We have a prefix and goal
//
// idea:idea
//
String prefix = tok.nextToken();
if ( numTokens == 2 )
{
goal = tok.nextToken();
}
else
{
// goal was missing - pass through to MojoNotFoundException
goal = "";
}
// This is the case where someone has executed a single goal from the command line
// of the form:
//
// mvn remote-resources:process
//
// From the metadata stored on the server which has been created as part of a standard
// Maven plugin deployment we will find the right PluginDescriptor from the remote
// repository.
plugin = findPluginForPrefix( prefix, session );
}
injectPluginDeclarationFromProject( plugin, project );
// If there is no version to be found then we need to look in the repository metadata for
// this plugin and see what's specified as the latest release.
//
if ( plugin.getVersion() == null )
{
resolvePluginVersion( plugin, session, project );
}
return pluginManager.getMojoDescriptor( plugin, goal, project.getRemotePluginRepositories(),
session.getRepositorySession() );
}
According to debugger session, when this method gets called, numToken is 2, which lead me to line 222 where, as it is written, the following code is called
plugin = findPluginForPrefix( prefix, session );
with prefix being http while goal (unused here) is //svn.branc.name.hidden. In other words, maven consider the -DSVN_URL=http://svn.branc.name.hidden command line argument as a goal call ... WHAT THE HELL ?
Let's go up a little.
First calss being called is org.codehaus.plexus.classworlds.launcher.Launcher which main method is given the following arguments array (thanks to Eclipse debugger):
args java.lang.String[19] (id=6596)
[0] "-Dos" (id=6597)
[1] "windows" (id=6598)
[2] "-DSVN_REVISION" (id=6599)
[3] "7436" (id=6600)
[4] "-Dsdk" (id=6601)
[5] "indesign-sdk" (id=6602)
[6] "-DSVN_URL" (id=6610)
[7] "http://svn.branc.name.hidden" (id=6583)
[8] "-Djava.awt.headless" (id=6611)
[9] "true" (id=6612)
[10] "-Dintegration" (id=6613)
[11] "jenkins" (id=6614)
[12] "clean" (id=6615)
[13] "deploy" (id=6621)
[14] "-pl" (id=6622)
[15] ":project.name.hidden" (id=6623)
[16] "-am" (id=6624)
[17] "-U" (id=6625)
[18] "-X" (id=6627)
So it seems the first call made by the JVM to maven JAR splits the various -D, which (according to this Stackoverflow answer) are supposed to be set as system properties. I'm totally puzzled now. What can I do to fix that ?
EDIT 2 The very command line used to start Java is (thanks to Process Explorer) C:\Program Files\Java\jdk1.6.0_37\bin\java.exe" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -classpath "C:\Program Files\Npackd\Maven-3.0.5\boot\plexus-classworlds-2.4.jar" "-Dclassworlds.conf=C:\Program Files\Npackd\Maven-3.0.5\bin\m2.conf" "-Dmaven.home=C:\Program Files\Npackd\Maven-3.0.5" org.codehaus.plexus.classworlds.launcher.Launcher -Dos windows -DSVN_REVISION 7436 -Dsdk indesign-sdk -DSVN_URL http://achille.perigee.fr/svn16/autocat/autocat-java/branches/1.3.0 -Djava.awt.headless true -Dintegration jenkins clean deploy -pl :project.name.hidden -am -U -X Wait, where are my =? Mmmh, i think I have a really good trail there !
Seems like this was in fact one of Jenkins/Windows most surprising mismatches.
well, in fact, it's more due to Windows cmd.exe bad behaviour ...
I solved this by changing the labels I had to use only one label, which kept the command line short enough to not have the = characters removed from it. More a workaround than a real solution, but, well, it worked.

Resources