[
http://jira.codehaus.org/browse/MANTTASKS-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_95499
]
Mykel Alvis commented on MANTTASKS-15:
--------------------------------------
I managed to work around this particular issue.
I WAS doing the following:
<target name="deploy-release" depends="install" description="Deploy
released jars to the remote m2 repo">
<property name="repo.url" value="${remote.release.url}" />
<antcall target="deploy-subordinate" >
<param name="repo.url" value="${ remote.release.url}" />
</antcall>
</target>
<target name="deploy-subordinate" description="Sub task to perfom deploys
based on a property">
<echo message="Deploying to ${ repo.url}" />
<echo message="using ${repository.username} and
${repository.privatekey}" />
<artifact:deploy file="${target.dist}/${artifactOne}">
<remoteRepository url="${ repo.url}">
<authentication username="${repository.username}"
password="${repository.password}" />
{blahblahblah}
The thing I was failing to recognize is the nature of antcall'd tasks.
Declaring the artifact:provider in one task makes it accessible in another
task, but not if I do an "antcall" to a subtask in an effort to consolidate
certain behaviors.. Dunno why I thought it would work. When I inheritRefs, the
pom reference I have in the artifact:deploy (not shown) has a reference
conflict.
So you can't do an antcall to call a task to do a deploy without re-decalaring
the provider. I have a provider call setup as part of the "init" call that's a
"depends" above, but the provider isn't available after the antcall.
It appears that wagon-ssh:1.0-alpha-7 is a valid scp provider, but 1.0-beta-2
gives an error:
java.lang.NoSuchMethodError:
org.apache.maven.wagon.CommandExecutor.executeCommand
(Ljava/lang/String;Z)Lorg/apache/maven/wagon/Streams;
> scp:// urls not recognised, even when wagon-ssh is installed.
> -------------------------------------------------------------
>
> Key: MANTTASKS-15
> URL: http://jira.codehaus.org/browse/MANTTASKS-15
> Project: Maven 2.x Ant Tasks
> Issue Type: Bug
> Reporter: Steve Loughran
> Priority: Minor
> Attachments: ant-v-logfile.txt, MANTTASKS-15.diff
>
>
> I have got the <install> task working to pull in the various deployment wagons
> <target name="m2-wagons" depends="m2-pom,ssh-init">
> <m2:install-provider artifactId="wagon-ssh"
> version="${wagon-ssh.version}"/>
> <m2:install-provider artifactId="wagon-ssh-external"
> version="${wagon-ssh-external.version}"/>
> <m2:install-provider artifactId="wagon-file"
> version="${wagon-file.version}"/>
> <m2:install-provider artifactId="wagon-ftp"
> version="${wagon-ftp.version}"/>
> </target>
> But when I run a deploy target and use the scp:// protocol , I get the
> unknown protocol error.
> <target name="m2-ssh-deploy" depends="m2-pom,ssh-init,m2-wagons">
>
> <property name="m2.upload.url"
> value="scp://${ssh.host}/www/repository"/>
> <m2:deploy file="${target.jar}">
> <remoteRepository url="${m2.upload.url}">
> <authentication username="${ssh.user}"
> privateKey="${ssh.keyfile}"/>
> </remoteRepository>
> <pom refid="m2.pom"/>
> </m2:deploy>
> </target>
> This is only for scp:, the others, scpexe, file: and ftp: do work. Is the url
> schema wrong? Is there any way to enum what protocols are currently supported?
> I would recommend that the error message "unsupported protocol" is
> supplemented with a listing of what protocols are supported. That way its
> easier to differentiate spelling error from uninstalled wagon.
--
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