[
https://issues.apache.org/jira/browse/GROOVY-4562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17468239#comment-17468239
]
Eric Milles commented on GROOVY-4562:
-------------------------------------
[~paulk]
It looks like this can be done now using the maven resolver ant tasks:
https://maven.apache.org/resolver-ant-tasks/
{code:groovy}
@Grab('org.apache.maven.resolver:maven-resolver-ant-tasks:1.4.0')
//@GrabConfig(systemClassLoader=true)
@Grab('org.codehaus.groovy:groovy-ant:3.0.9')
import groovy.ant.AntBuilder
@Grab('org.codehaus.groovy:groovy-xml:3.0.9')
import groovy.xml.NamespaceBuilder
new AntBuilder().with {
resolver = NamespaceBuilder.newInstance(it,
'antlib:org.apache.maven.resolver.ant')
resolver.resolve {
resolver.dependencies {
resolver.dependency groupId:'junit', artifactId:'junit', version:'4.13.2'
}
}
echo 'complete success'
}
{code}
> antbuilder does not work well with maven-ant-tasks
> --------------------------------------------------
>
> Key: GROOVY-4562
> URL: https://issues.apache.org/jira/browse/GROOVY-4562
> Project: Groovy
> Issue Type: Bug
> Components: Ant integration
> Affects Versions: 1.7.5
> Environment: wxp sp3, jdk 1.6.0_20, groovy 1.7.5 - 1.8.0,
> maven-ant-tasks 2.1.0 - 2.1.3
> Reporter: Pertino Juan
> Priority: Minor
> Attachments: build.groovy, build.xml
>
>
> ant builder does not seem to realize when the maven dependencies task has
> finished
> the script that run the task must thus be killed. no workaround found.
> a quick inspection reveals a thread pool defying program termination
> did i miss any antbuilder flag?
> i dont really know where the problem comes from
> and im inclined to believe its a maven-ant-tasks thing,
> but as the equivalent ant project works just fine...
> attached is the simplest failing example and the working ant build
--
This message was sent by Atlassian Jira
(v8.20.1#820001)