I am trying to use the optional Ant FTP task in a groovy script using the gmaven plugin but I continue to get a ClassNotFoundException. I did get the commons-lang example working that uses the SystemUtils class though, so I am not sure what the difference is.
I have attached my POM.
Here is the error:
[INFO] [groovy:execute {execution: default}]
[INFO] Entering in ftp script
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] : Problem: failed to create task or type ftp
Cause: the class org.apache.tools.ant.taskdefs.optional.net.FTP was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-ANT_HOME/lib
-the IDE Ant configuration dialogs
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
--------------------------------------------
Now I know I could probably fix this issue by dropping the jar file in ANT_HOME, but I don't want to do that because I have several machines I would have to update including all the developers on the team having to do the same. Besides it should work by specifying a classpath element.
I think the commons-lang doc is a bug, since commons-lang is already in the classpath from transitive deps. Will have a look at what is wrong shortly.