You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris <sh...@yahoo.com> on 2008/12/01 04:00:25 UTC
How to get reference to dependency fileset in Ant?
I'm calling an Ant script using the maven-antrun-plugin. How do I get a
fileset reference to the dependencies from within my Ant script?
I'd like to copy all of the jar files that my app depends on to a
particular directory.
I know it's possible if I'm call Maven from Ant (using
<artifact:dependencies> syntax). But I'm calling Ant from Maven, and
would like to pass in the fileset reference the same way we pass in
classpath references.
My pom looks pretty standard, just like these examples:
http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to get reference to dependency fileset in Ant?
Posted by Chris <sh...@yahoo.com>.
Chris wrote:
> Wayne Fay wrote:
>>> I'd like to copy all of the jar files that my app depends on to a
>>> particular
>>> directory.
>>
>> Any specific reason you're not just doing this with the dependency
>> plugin?
>> http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
>>
>>
>> Wayne
>
> Yes, several. There are a great many things that Maven can't handle that
> Ant does very nicely. It's all part of a larger build process for
> creating the final release that involves several steps that are beyond
> the capabilities of the assembly plugin. So yes, there is a use case for
> getting filesets of dependencies in Ant.
>
> I don't mean to dis Maven -- it's a great tool -- but it has limitations.
For the curious, I figured it out. Pass in the classpath, instead of a
fileset. The <copy> task in Ant 1.7 will accept a path as well as a fileset.
<copy flatten="true" toDir="${release_dir}/lib" verbose="true" >
<path>
<pathelement path="${compile_classpath}"/>
</path>
</copy>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to get reference to dependency fileset in Ant?
Posted by Chris <sh...@yahoo.com>.
Wayne Fay wrote:
>> I'd like to copy all of the jar files that my app depends on to a particular
>> directory.
>
> Any specific reason you're not just doing this with the dependency plugin?
> http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
>
> Wayne
Yes, several. There are a great many things that Maven can't handle that
Ant does very nicely. It's all part of a larger build process for
creating the final release that involves several steps that are beyond
the capabilities of the assembly plugin. So yes, there is a use case for
getting filesets of dependencies in Ant.
I don't mean to dis Maven -- it's a great tool -- but it has limitations.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to get reference to dependency fileset in Ant?
Posted by Wayne Fay <wa...@gmail.com>.
> I'd like to copy all of the jar files that my app depends on to a particular
> directory.
Any specific reason you're not just doing this with the dependency plugin?
http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org