[ http://jira.codehaus.org/browse/MANTTASKS-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=199511#action_199511 ]
Richard Bock commented on MANTTASKS-161: ---------------------------------------- Hi Paul, Unfortunately I cannot upload a sample for this. But I can give the you groovy code that compensates for it: def pom=ant.project.references[pomId] def artifact=pom.artifact def artifactFolder=pom.artifact.groupId.replace('.','/')+'/'+pom.artifact.artifactId+'/'+pom.artifact.version def deploy=p.'repository.deploy' if( deploy != null && deploy.toLowerCase() == "true") { //copy the pom file to create the full directory path then use the official deploy ant.scp(trust:true, todir:p.'repository.username'+':'+p.'repository.password'+'@svne1.access.nokiasiemensnetworks.com:/isource/mvnroot/SDF_SCE', ) { fileset(dir:p.'localrepository.dir') { include(name:artifactFolder+'/*.pom') } } mavenArtifact.'install-provider'(artifactId:"wagon-ssh", version:"1.0-beta-2") mavenArtifact.deploy(file:artifactFilename, pomrefid:pomId) { localRepository() remoteRepository(url:p.'repository.url') { authentication(username:p.'repository.username', password:p.'repository.password') } } } The repository does exist already. But i need to create the full path of the artifact. I do that by just copying the pom file to the remote repository. Then I am using the deploy task and it works. I am using the maven anttask shipped with 2.0.10. Do you know is there any bugfix update lately. Or an maven anttask with a higher version of maven? Regards Richard > SSH Wagon Provider for remote repository does not working with anttask deploy > ----------------------------------------------------------------------------- > > Key: MANTTASKS-161 > URL: http://jira.codehaus.org/browse/MANTTASKS-161 > Project: Maven 2.x Ant Tasks > Issue Type: Bug > Affects Versions: 2.0.10 > Reporter: Richard Bock > > <artifact:deploy pomrefid="mypom" file="${build.dir}/sce.maven.jar"> > <remoteRepository > url="scp://svne1.access.nokiasiemensnetworks.com/isource/mvnroot/SDF_SCE"> > <authentication username="${repository.username}" > password="${repository.password}"/> > </remoteRepository> > </artifact:deploy> > This works when I create the full path in the remote server. When I do not > create the path I am getting the following error: > deploy: > [artifact:install-provider] Installing provider: > org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-2:runtime > [artifact:deploy] Deploying to > scp://svne1.access.nokiasiemensnetworks.com/isource/mvnroot/SDF_SCE > [artifact:deploy] Uploading: > com/nsn/see/sce/core/maventools/5.0.0/maventools-5.0.0.jar to remote > [artifact:deploy] An error has occurred while processing the Maven artifact > tasks. > [artifact:deploy] Diagnosis: > [artifact:deploy] > [artifact:deploy] Error deploying artifact > 'com.nsn.see.sce.core:maventools:jar': Error deploying artifact: SCP > terminated with error: 'scp: > /isource/mvnroot/SDF_SCE/com/nsn/see/sce/core/maventools/5.0.0/maventools-5.0.0.jar: > No such file or directory' > [artifact:deploy] > BUILD FAILED > D:\work\sce\sce\sce.maven\build.xml:127: Error deploying artifact > 'com.nsn.see.sce.core:maventools:jar': Error deploying artifact: SCP > terminated with error: 'scp: > /isource/mvnroot/SDF_SCE/com/nsn/see/sce/core/maventools/5.0.0/maventools-5.0.0.jar: > No such file or directory' > Either I did not understand the example how to use the scp wagon and deploy > task or the wagon does not create the folder automatically before it uses scp > to copy the files. > In the first case please let me know how to fix this using a proper > configuration and in the second case can you provide a bugfix? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira