On Sat, Mar 20, 2010 at 9:22 AM, Vincent Massol <[email protected]> wrote:

>
> On Mar 20, 2010, at 3:32 AM, Florin Ciubotaru wrote:
>
> > Hi Vincent,
> >
> > On Fri, Mar 19, 2010 at 8:04 PM, Vincent Massol <[email protected]>
> wrote:
> >
> >>
> >> On Mar 19, 2010, at 6:58 PM, Florin Ciubotaru wrote:
> >>
> >>> Hi,
> >>>
> >>> We're now setting up the windows build agent for hudson.
> >>> In order to make deployments from windows machines we need to switch
> the
> >>> protocol from scp to scpexe.
> >>
> >> Do you know why ?
> >>
> > It is because wagon doesn't properly apply the config from settings.xml
> when
> > the protocol is set to scp. Maven's scp is a pure java implementation
> while
> > scpexe can use extenal binaries.
> > The scp implementation in java works fine on linux machines and loads the
> > config from ~/.ssh/authorized_keys, such a config does not exist on
> windows.
> > This means that on windows we need to rely on tools like putty and pscp
> to
> > handle the uploads.
> >
> > Note that maven's documentation regarding this is quite poor, thus I
> can't
> > provide any useful web references.
>
> I'd need to search but I'm pretty sure you can make it work on windows
> machine and you don't need to change to scpexe which should be avoided as
> much as possible (same svnexe). Using a pure java impl is always better
> since it reduces the dependency on the environment and make it work
> everywhere.
>
Scpexe also uses the java implementation if a ssh/scp tool is not explicitly
configured in settings.xml.

>
> Could you tell us what error you get ?
>
Here's the build/deploy error message:

 [INFO] Error retrieving previous build number for artifact
'org.xwiki.platform.applications:xwiki-application-tag:xar': repository
metadata for: 'snapshot org.x
wiki.platform.applications:xwiki-application-tag:1.12-SNAPSHOT' could not be
retrieved from repository: maven.xwiki.org due to an error: While
configuring wagon
 for 'maven.xwiki.org': Unable to apply wagon configuration.
Cannot find setter nor field in
org.apache.maven.wagon.providers.ssh.jsch.ScpWagon for 'scpExecutable'

This only happens if the parent pom uses scp. The issue is fixed locally
after modifying the pom to scpexe & installing it to the local repository.
IMO this looks like a Wagon limitation. We're using version 1.0-alpha-5, I'm
not sure if this was modified in more recent releases:
-
http://jira.codehaus.org/browse/WAGON#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel


> Also have you configured properly the config in settings.xml, something
> like the following in the server section:
>
>      <configuration>
>        <scpExecutable>pscp</scpExecutable>
>        <scpArgs>-v</scpArgs>
>      </configuration>
>
As seen in the error message above, this is one of the configs I was trying.
Another option would be to use cygwin instead of putty apps as it doesn't
need the settings.xml configuration, but I think that configuring it would
end up being more system dependent then the current approach.

Thanks,
Florin Ciubotaru

>
> Thanks
> -Vincent
>
>
> >
> > Florin Ciubotaru
> >
> >>
> >> Thanks
> >> -Vincent
> >>
> >>> The local machines needs to declare the ssh and scp tools configuration
> >>> in maven's settings.xml. Windows tools like putty and pscp are not
> >>> properly configured when the protocol is set to scp.
> >>>
> >>> The deployment protocol is specified in our parrent pom. Eg:
> >>>
> >>> <distributionManagement>
> >>>    <site>
> >>>      <id>maven.xwiki.org</id>
> >>>      <url>scp://maven.xwiki.org/home/maven/public_html/site</url>
> >>>    </site>
> >>>    <repository>
> >>>      <id>maven.xwiki.org</id>
> >>>      <name>XWiki Maven2 Remote Repository for Releases</name>
> >>>      <url>scp://maven.xwiki.org/home/maven/public_html/releases</url>
> >>>    </repository>
> >>>    <snapshotRepository>
> >>>      <id>maven.xwiki.org</id>
> >>>      <name>XWiki Maven2 Development Repository for Snapshots</name>
> >>>      <url>scp://maven.xwiki.org/home/maven/public_html/snapshots</url>
> >>>    </snapshotRepository>
> >>>  </distributionManagement>
> >>>
> >>> WDYT about changing this?
> >>>
> >>> Thanks,
> >>> Florin Ciubotaru
> >>>
> >>
> >> _______________________________________________
> >> devs mailing list
> >> [email protected]
> >> http://lists.xwiki.org/mailman/listinfo/devs
> >>
> > _______________________________________________
> > devs mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/devs
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to