Hi,

I try to use the Plugin wagon-maven-plugin (see 
http://mojo.codehaus.org/wagon-maven-plugin/index.html wagon-maven-plugin )
to copy an artifact to a remote host via scp but I can't manage it.
I have followed the instructions under 
http://mojo.codehaus.org/wagon-maven-plugin/usage.html usage 

It works using the following command:
scp target/ear-example.ear [email protected]:.

Details

Maven Command
mvn clean package wagon:upload-single -P remote-wagon

Configuration
$ mvn -version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
OS on Remote Host: Linux

pom.xml
...
  <build>
    <finalName>ear-example</finalName>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>1.0-beta-2</version>
      </extension>
    </extensions>
...
  </build>
...
    <profile>
      <id>remote-wagon</id>
      <build>

        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>wagon-maven-plugin</artifactId>
            <version>1.0-beta-1</version>
            <configuration>
              <serverId>myRemoteHost</serverId>
             
<fromFile>${project.build.directory}/${project.build.finalName}.ear</fromFile>
              <url>scp://myRemoteHost.domain.ch/</url>
            </configuration>

          </plugin>
        </plugins>
      </build>
    </profile>
...

settings.xml
...
   <proxies>
      <proxy>
         <id>optional</id>
         <active>true</active>
         <protocol>http</protocol>
         <host>www-myProxy.domain.ch</host>
         <port>8080</port>
         <nonProxyHosts>*.domain.ch</nonProxyHosts>
      </proxy>
   </proxies>
...
      <server>
         <id>myRemoteHost</id>
         <username>myUserName</username>
         <password>myPassword</password>
      </server>
...


known_hosts
A valid file is under:
c:\Documents and Settings\myUserName\.ssh\known_hosts

Error Message
[DEBUG] Configuring mojo
'org.codehaus.mojo:wagon-maven-plugin:1.0-beta-1:upload-single' -->
[DEBUG]   (f) fromFile =
c:\jp\projects\ipi-ear-example\ipi-ear-example-ear\target\ear-example.ear
[DEBUG]   (f) project = MavenProject:
ch.ipi:ipi-ear-example-ear:1.0.1-SNAPSHOT @
c:\jp\projects\ipi-ear-example\ipi-ear-example-ear\pom.xml
[DEBUG]   (f) serverId = myRemoteHost
[DEBUG]   (f) settings = org.apache.maven.settings.setti...@1f21c50
[DEBUG]   (f) skip = false
[DEBUG]   (f) url = scp://myRemoteHost.domain.ch/
[DEBUG] -- end configuration --
[INFO] [wagon:upload-single]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Unable to create a Wagon instance for scp://myRemoteHost.domain.ch/

Embedded error: Cannot connect. Reason: ProxyHTTP: java.io.IOException:
proxy error: Temporary Redirect
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to create a
Wagon instance for scp://myRemoteHost.domain.ch/


-- 
View this message in context: 
http://www.nabble.com/wagon-maven-plugin-and-scp-tp21202731p21202731.html
Sent from the mojo - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to