Ok, we're finally getting moving on this.

I've added this to my POM file for the ear. I want the ear file uploaded as
part of the package phase.

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-upload-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>upload-ear</id>
                        <phase>package</phase>
                        <goals>
                            <goal>upload</goal>
                        </goals>
                        <configuration>
                            
<resourceSrc>${project.build.directory}/${project.build.finalName}.ear</resourceSrc>
                            <resourceDest></resourceDest>
                            <serverId>inet3</serverId>
                           
<url>scp://inet3.warpspeed.com.au/was51/gpdb/ears</url>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

And I've added this section to my settings.xml file:

<servers>
    <server>
        <id>inet3</id>
        <username>xxxx</username>
        <password>yyyy</password>
        <filePermissions>664</filePermissions>
        <directoryPermissions>775</directoryPermissions>
    </server>
</servers>

When I run it, it prompts me for the RSA fingerprint manually:

[INFO] Building jar: C:\Documents and Settings\Chris\My
Documents\IBM\rationalsdp7.0\workspace\GPDBEAR\target\GPDBEAR-1.0.6-SNAPSHOT.ear
[INFO] [upload:upload {execution: upload-ear}]
The authenticity of host 'inet3.warpspeed.com.au' can't be established.
RSA key fingerprint is aa:bb:cc:dd:ee:ff:gg:hh:ii:jj:kk:ll:mm:nn:oo:pp.
Are you sure you want to continue connecting? (yes/no): yes
scp://inet3.warpspeed.com.au/was51/gpdb/ears - Session: Opened
Executing command: mkdir -p /was51/gpdb/ears
Executing command: scp -t /was51/gpdb/ears/GPDBEAR-1.0.6-SNAPSHOT.ear
Uploading: GPDBEAR-1.0.6-SNAPSHOT.ear to
scp://inet3.warpspeed.com.au/was51/gpdb/ears

#...#

Transfer finished. 23114169 bytes copied in 65.313 seconds
scp://inet3.warpspeed.com.au/was51/gpdb/ears - Session: Disconnecting
scp://inet3.warpspeed.com.au/was51/gpdb/ears - Session: Disconnected

Is there a way to specify the fingerprint, or is this just a part of scp?

When I specify sftp, it does not prompt me (so I guess I'll stick with
that...)

Now I get:

[INFO] Building jar: C:\Documents and Settings\Chris\My
Documents\IBM\rationalsdp7.0\workspace\GPDBEAR\target\GPDBEAR-1.0.6-SNAPSHOT.ear
[INFO] [upload:upload {execution: upload-ear}]
sftp://inet3.warpspeed.com.au/was51/gpdb/ears - Session: Opened
Uploading: ./GPDBEAR-1.0.6-SNAPSHOT.ear to
sftp://inet3.warpspeed.com.au/was51/gpdb/ears

#...#
Transfer finished. 23114164 bytes copied in 13.25 seconds
sftp://inet3.warpspeed.com.au/was51/gpdb/ears - Session: Disconnecting
sftp://inet3.warpspeed.com.au/was51/gpdb/ears - Session: Disconnected

Hmmm. A damn sight faster too.

So, I really do think that I'll stick with that...

-Chris

-- 
View this message in context: 
http://www.nabble.com/Copy-the-artifact-via-scp-to-our-server-tp18775690p19181185.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to