Im trying to use the groovy-maven-plugin to execute some groovy scripts that
make use of the antbuilder. I need to be able to use the maven-ant-tasks
within this script, which I've tried to do as follows:

def mvn = NamespaceBuilder.newInstance(ant, 'antlib:
org.apache.maven.artifact.ant')

mvn.dependencies(pathId:myMvnPath){
    pom(file:"somepom.xml")
}

I've been using this approach within some groovy plugins that I've written
and it's had no problems picking up the ant tasks from the classpath.

However, when utilizing the groovy-maven-plugin within a pom with the exact
same dependencies as my plugins, I'm getting the following error:

Problem: failed to create task or type antlib:
org.apache.maven.artifact.ant:dependencies
Cause: The name is undefined.

Running dependency:resolve against both poms results in the exact same
dependencies. I am stumped about how to get this to work. Anyone have any
ideas?

Thanks!

Reply via email to