You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by motes motes <mo...@gmail.com> on 2011/11/11 12:08:00 UTC

Copy and rename file to server - maven-antrun-plugin

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org