I need to use maven-antrun to copy a file from my local machine to a
remove server/filesystem:

                        <plugin>
                                <artifactId>maven-antrun-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <id>copy-to-server</id>
                                                <phase>deploy</phase>
                                                <goals>
                                                        <goal>run</goal>
                                                </goals>
                                                <configuration>
                                                        <target 
name="copy-to-server">
                                                        <scp 
file="${project.build.directory}/${project.artifactId}.zip"
localTofile="${user}:${password}@${host}:/datafolder/test.zip"/>
                                                        </target>
                                                </configuration>
                                        </execution>

but if fails (the file
${project.build.directory}/${project.artifactId}.zip does exist):

 'todir' and 'file' attributes must have syntax like the following:
user:password@host:/path -> [Help 1]

I have also tried with:

remoteFile

but it does not work either:

http://ant.apache.org/manual/Tasks/scp.html

How do I rename the file that must be copied? maven-resources-plugin
could be used but is maybe a bit overkill.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to