I wasn't
sure if putty could be used from the command line, and that is why I was
asking about other ssh clients.

Oh! Well, you want to use "plink.exe" or "pscp.exe" instead of putty.exe on the command line.


To execute a command on the remote host:
plink -ssh [EMAIL PROTECTED] 'remote_commands_to_execute'

To copy a file to a remote host:
pscp c:\local\file.ext [EMAIL PROTECTED]:/path/to/remote/folder

To copy a file from a remote host
pscp [EMAIL PROTECTED]:/path/to/remote/folder/file.ext c:\local\

I have never done deployment quite the way you seem to be doing it, so I can't really comment, but my custom deployment stuff in my maven.xml is along the lines of:

<goal name="myproject:deploy"
        description="Deploy stuff">
        <attainGoal name="war"/>
        <echo>
            +-------------------------------------------------------+
            | Deploying WAR file.                                   |
            +-------------------------------------------------------+
        </echo>

<ant:exec dir="." executable="${context.getVariable('maven.scp.executable')}">
<ant:arg line="-C -r -q '${basedir}/target/${maven.final.name}.war' [EMAIL PROTECTED]:/home/stuff/webapps/${maven.final.name}.war"/>
</ant:exec>
</goal>


where maven.scp.executable is 'pscp'.

Hope that helps.

Gabe


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



Reply via email to