You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Fritz Richter <ri...@hildebrand-richter.de> on 2008/08/01 16:34:36 UTC

Copy the artifact via scp to our server

Hi togehter,
I was searching the internet for an hour now, and can't find a nice  
solution for my really easy problem.

We have a maven project, which produces a war file, which actually  
works great.
Further we have a server whith different jetty-servers running.
Dev-Server, Test-Server, Live-Server.

Now, I just want to deploy our war-file to the server via scp.

If I configure the pom like the following:

<distributionManagement>
         <repository>
             <id>internal-server</id>
             <name>Internal Server</name>
             <url>${serverURL}</url>
         </repository>
</distributionManagement>

than the entire maven-structure is copied. But I acutally just want to  
copy our xyz.war
to the specific location.

Because Jetty recognises the change it will automatically reload the  
war.

Any ideas?

Kind regards
Fritz

Re: Copy the artifact via scp to our server

Posted by ChrisGWarp <Ch...@aami.com.au>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Copy the artifact via scp to our server

Posted by ChrisGWarp <Ch...@aami.com.au>.


ChrisGWarp wrote:
> 
> 
> 
> Wendy Smoak-3 wrote:
>> 
>> Atlassian has a 'Maven Upload Plugin' though I can't find the docs
>> atm.  And recently Don created a plugin for testing against multiple
>> servers-- check the list archives for the past couple of weeks.
>> 
> 
> Hi Wendy.
> 
> I've found the docs on the reference that you gave, but I can not find the
> plugin itself.
> 
> Any ideas as to where I can find it?
> 
> TIA,
> 
> -Chris
> 
> 

Stupid me.

http://repository.atlassian.com/maven2/com/atlassian/maven/plugins/maven-upload-plugin/1.1/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Copy the artifact via scp to our server

Posted by ChrisGWarp <Ch...@aami.com.au>.


Wendy Smoak-3 wrote:
> 
> Atlassian has a 'Maven Upload Plugin' though I can't find the docs
> atm.  And recently Don created a plugin for testing against multiple
> servers-- check the list archives for the past couple of weeks.
> 

Hi Wendy.

I've found the docs on the reference that you gave, but I can not find the
plugin itself.

Any ideas as to where I can find it?

TIA,

-Chris

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Copy the artifact via scp to our server

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Aug 1, 2008 at 8:33 AM, Fritz Richter
<ri...@hildebrand-richter.de> wrote:

> Hi Wendy,
> because I can't change the name of the resource on the des-side,

What do you mean?

> I want to try out Don's stuff.
> To search in the list archives, can you give me a hint / keyword?

This is what I was thinking of (on the Struts dev list):
http://www.nabble.com/-s2--Hurray%2C-we-have-functional-integration-tests-td18713793.html#a18713793

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Copy the artifact via scp to our server

Posted by Fritz Richter <ri...@hildebrand-richter.de>.
>
Hi Wendy,
because I can't change the name of the resource on the des-side,
I want to try out Don's stuff.

To search in the list archives, can you give me a hint / keyword?

Cheers
Fritz


> Atlassian has a 'Maven Upload Plugin' though I can't find the docs
> atm.  And recently Don created a plugin for testing against multiple
> servers-- check the list archives for the past couple of weeks.
>
> You could also simply use the Exec plugin to execute a script, or use
> Cargo which understands how to deploy to various servers.
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Copy the artifact via scp to our server

Posted by Fritz Richter <ri...@hildebrand-richter.de>.
Thanks Wendy,
I found the docs here:
http://docs.atlassian.com/maven-upload-plugin/1.1/index.html

Cheers Fritz

Am 01.08.2008 um 16:41 schrieb Wendy Smoak:

> On Fri, Aug 1, 2008 at 7:34 AM, Fritz Richter
> <ri...@hildebrand-richter.de> wrote:
>
>> Now, I just want to deploy our war-file to the server via scp.
>>
>> If I configure the pom like the following:
>>
>> <distributionManagement>
>
> That is for deploying to a remote Maven repository, not to an app
> server.  The name of the 'deploy' phase is confusing, but Maven's
> default lifecycle stops at the repository.
>
> Atlassian has a 'Maven Upload Plugin' though I can't find the docs
> atm.  And recently Don created a plugin for testing against multiple
> servers-- check the list archives for the past couple of weeks.
>
> You could also simply use the Exec plugin to execute a script, or use
> Cargo which understands how to deploy to various servers.
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Copy the artifact via scp to our server

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Aug 1, 2008 at 7:34 AM, Fritz Richter
<ri...@hildebrand-richter.de> wrote:

> Now, I just want to deploy our war-file to the server via scp.
>
> If I configure the pom like the following:
>
> <distributionManagement>

That is for deploying to a remote Maven repository, not to an app
server.  The name of the 'deploy' phase is confusing, but Maven's
default lifecycle stops at the repository.

Atlassian has a 'Maven Upload Plugin' though I can't find the docs
atm.  And recently Don created a plugin for testing against multiple
servers-- check the list archives for the past couple of weeks.

You could also simply use the Exec plugin to execute a script, or use
Cargo which understands how to deploy to various servers.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org