Maven build fails on an Ant FTP task failure
- by fraido
I'm using the FTP Ant task with maven-antrun-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>ftp</id>
<phase>generate-resources</phase>
<configuration>
<tasks>
<ftp action="get"
server="${ftp.server.ip}"
userid="${ftp.server.userid}"
password="${ftp.server.password}"
remotedir="${ftp.server.remotedir}"
depends="yes" verbose="yes"
skipFailedTransfers="true"
ignoreNoncriticalErrors="true">
<fileset dir="target/test-classes/testdata">
<include name="**/*.html" />
</fileset>
</ftp>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
...
the problem is that my build fails when the folder ${ftp.server.remotedir} doesn't exist.
I tried to specify
skipFailedTransfers="true"
ignoreNoncriticalErrors="true
but these don't fix the problem and the build keeps failing.
An Ant BuildException has occured: could not change remote directory: 550 /myBadDir: The system cannot find the file specified.
Do you know how to instruct my maven build to don't care about this Ant task error