-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins ver. 1.642.4.2
Maven Integration plugin 2.13
The build step 'Deploy artifacts to Maven repository' (RedeployPublisher) feature performs the deployments from the master. That can lead to an UnknownHostException if only the slave can access the target repository.
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to retrieve remote metadata ****/maven-metadata.xml: Could not transfer metadata ****/maven-metadata.xml from/to ****: unknown error at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143) at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:193) at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:176) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1047) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) (...) Caused by: java.net.UnknownHostException: ****: unknown error
That can also be a network bandwidth issue if the slave has a better connection with the repository than the master.
It would be great being able to choose where the artifact deployment should be performed from.
AFAIR there is a technical reason behind this due to the fact that it is a Publisher but there was also the need to re-run the deployment. But I agree that deploying them from the slave and without the need to archive it should have been more efficient for a large part of users