Building my project with Jenkins. The workspace is on a jenkins slave node.
This slave node happens to be the same server which is running the Sonatype
Nexus Repository.

Jenkins master is running on user called jenkins. The slave node is
configured for the user called build on that slave, but I don't think thats
a problem.

I'm not sure where the connection happens from, From the jenkins master
server machine to the server machine running Nexus and the slave node, or if
it is trying to run scp from the slave node to the same slave node.

Maven distribution management is configured like this:
    <distributionManagement>
        <repository>
        <id>releases</id>
        <url>scp://maven-vm1/srv/maven/releases</url>
        </repository>
    </distributionManagement>
This directory has chmod 775, where user build is owner and user jenkins has
group access. So access should not be a problem while trying to deploy the
artifacts.

While on Nexus release repository summary section it uses an http URL for
uploading:
    <distributionManagement>
      <repository>
        <id>releases</id>
        <url>http://maven-vm1:8080/nexus/content/repositories/releases</url>
      </repository>
   </distributionManagement>

I want to use SCP for the transfer...

*Errormessage from maven:*
message : Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on
project myApp: Failed to deploy artifacts: Could not transfer artifact
com.company:myApp:jar:2.4.0 from/to releases
(scp://maven-vm1/srv/maven/releases): Cannot connect. Reason: Auth fail
cause : Failed to deploy artifacts: Could not transfer artifact
com.company:myApp:jar:2.4.0 from/to releases
(scp://maven-vm1/srv/maven/releases): Cannot connect. Reason: Auth fail
Stack trace : 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
(default-deploy) on project myApp: Failed to deploy artifacts: Could not
transfer artifact com.company:myApp:jar:2.4.0 from/to releases
(scp://maven-vm1/srv/maven/releases): Cannot connect. Reason: Auth fail
        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.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
        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:601)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
        at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
        at hudson.remoting.UserRequest.perform(UserRequest.java:118)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy
artifacts: Could not transfer artifact com.company:myApp:jar:2.4.0 from/to
releases (scp://maven-vm1/srv/maven/releases): Cannot connect. Reason: Auth
fail



--
View this message in context: 
http://maven.40175.n5.nabble.com/maven-deploy-artifacts-to-Nexus-repository-tp5751512.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to