You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Clifton <cl...@gmail.com> on 2008/01/24 21:58:03 UTC
For each jar in a fileset
I need to unjar each jar in a fileset. What's the easiest approach without
getting into extra libs, scripting and what not?
--
View this message in context: http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p15074819.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: AW: For each jar in a fileset
Posted by James Abley <ja...@gmail.com>.
On 25/01/2008, Clifton <cl...@gmail.com> wrote:
>
> Thanx Jan. That works too but only on Ant-1.7+. I'm running the build
> indirectly from a Maven pom via the ant-run plugin. Apparently Maven-ant-run
> is only 1.6.5 compatible so I need more magic. I'm going to move my question
> to the Maven mailing list because what I'm trying to do is a little more
> involved. If you have any other clues how to simplify without getting into
> extra jar dependencies please reply.
>
Works for me on Maven 2.0.6. I've got the following in a subsystem module pom.
<plugin>
<!-- Do any final packaging tasks. -->
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<!--
this needs to get executed before the
final assembly plugin.
-->
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--
Do the things in ANT that Maven
won't let us do:
* Create single DDL file for each DB vendor.
* Get all of the licenses into a
suitable structure.
* Unpack the RAR file and format is required
* Add any new directories to it.
-->
<ant
antfile="${basedir}/src/main/ant/build.xml" inheritRefs="true" />
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.7.0</version>
</dependency>
</dependencies>
</plugin>
My build file that get called uses <javaresource/>, which is a 1.7+
feature? You should be able to use the same mechanism to use 1.7
features.
Cheers,
James
>
> Jan.Materne wrote:
> >
> > <unjar><path refid> ?
> >
> > Not tested - but <unjar> should support resource sollections (and paths
> > are rc's)
> >
> >
> > Jan
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Clifton [mailto:clifton.craig@gmail.com]
> >> Gesendet: Freitag, 25. Januar 2008 15:28
> >> An: user@ant.apache.org
> >> Betreff: Re: AW: For each jar in a fileset
> >>
> >>
> >> I'm sorry, yes that works but what I really meant to ask was
> >> how can I unjar
> >> each entry from a path reference? I've got it working using
> >> beanshell which
> >> is rather ugly and unportable. I need this to run on other
> >> dev boxes without
> >> the hassle of installing the bsf jar and dependencies and the
> >> bsh jar. I'm
> >> really having a hard time here.
> >>
> >> Jan.Materne wrote:
> >> >
> >> > Just
> >> > <unjar><fileset/></unjar>
> >> >
> >> > Tested example
> >> > <property name="lib.dir" location="${ant.home}/lib"/>
> >> > <property name="dest.dir" value="extracted"/>
> >> >
> >> > <delete dir="${dest.dir}"/>
> >> > <mkdir dir="${dest.dir}"/>
> >> > <unjar dest="${dest.dir}">
> >> > <fileset dir="${lib.dir}"
> >> > includes="**/*launcher*.jar,**/*nodeps*.jar"/>
> >> > </unjar>
> >> >
> >> >
> >> >
> >> > Jan
> >> >
> >> >
> >> >> -----Ursprüngliche Nachricht-----
> >> >> Von: Clifton [mailto:clifton.craig@gmail.com]
> >> >> Gesendet: Donnerstag, 24. Januar 2008 21:58
> >> >> An: user@ant.apache.org
> >> >> Betreff: For each jar in a fileset
> >> >>
> >> >>
> >> >> I need to unjar each jar in a fileset. What's the easiest
> >> >> approach without
> >> >> getting into extra libs, scripting and what not?
> >> >> --
> >> >> View this message in context:
> >> >> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
> >> >> 74819.html
> >> >> Sent from the Ant - Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> >> For additional commands, e-mail: user-help@ant.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> > For additional commands, e-mail: user-help@ant.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
> >> 88491.html
> >> Sent from the Ant - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p15089412.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: AW: For each jar in a fileset
Posted by Clifton <cl...@gmail.com>.
Thanx Jan. That works too but only on Ant-1.7+. I'm running the build
indirectly from a Maven pom via the ant-run plugin. Apparently Maven-ant-run
is only 1.6.5 compatible so I need more magic. I'm going to move my question
to the Maven mailing list because what I'm trying to do is a little more
involved. If you have any other clues how to simplify without getting into
extra jar dependencies please reply.
Jan.Materne wrote:
>
> <unjar><path refid> ?
>
> Not tested - but <unjar> should support resource sollections (and paths
> are rc's)
>
>
> Jan
>
>> -----Ursprüngliche Nachricht-----
>> Von: Clifton [mailto:clifton.craig@gmail.com]
>> Gesendet: Freitag, 25. Januar 2008 15:28
>> An: user@ant.apache.org
>> Betreff: Re: AW: For each jar in a fileset
>>
>>
>> I'm sorry, yes that works but what I really meant to ask was
>> how can I unjar
>> each entry from a path reference? I've got it working using
>> beanshell which
>> is rather ugly and unportable. I need this to run on other
>> dev boxes without
>> the hassle of installing the bsf jar and dependencies and the
>> bsh jar. I'm
>> really having a hard time here.
>>
>> Jan.Materne wrote:
>> >
>> > Just
>> > <unjar><fileset/></unjar>
>> >
>> > Tested example
>> > <property name="lib.dir" location="${ant.home}/lib"/>
>> > <property name="dest.dir" value="extracted"/>
>> >
>> > <delete dir="${dest.dir}"/>
>> > <mkdir dir="${dest.dir}"/>
>> > <unjar dest="${dest.dir}">
>> > <fileset dir="${lib.dir}"
>> > includes="**/*launcher*.jar,**/*nodeps*.jar"/>
>> > </unjar>
>> >
>> >
>> >
>> > Jan
>> >
>> >
>> >> -----Ursprüngliche Nachricht-----
>> >> Von: Clifton [mailto:clifton.craig@gmail.com]
>> >> Gesendet: Donnerstag, 24. Januar 2008 21:58
>> >> An: user@ant.apache.org
>> >> Betreff: For each jar in a fileset
>> >>
>> >>
>> >> I need to unjar each jar in a fileset. What's the easiest
>> >> approach without
>> >> getting into extra libs, scripting and what not?
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
>> >> 74819.html
>> >> Sent from the Ant - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> >> For additional commands, e-mail: user-help@ant.apache.org
>> >>
>> >>
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> > For additional commands, e-mail: user-help@ant.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
>> 88491.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p15089412.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: AW: For each jar in a fileset
Posted by Ja...@rzf.fin-nrw.de.
<unjar><path refid> ?
Not tested - but <unjar> should support resource sollections (and paths are rc's)
Jan
> -----Ursprüngliche Nachricht-----
> Von: Clifton [mailto:clifton.craig@gmail.com]
> Gesendet: Freitag, 25. Januar 2008 15:28
> An: user@ant.apache.org
> Betreff: Re: AW: For each jar in a fileset
>
>
> I'm sorry, yes that works but what I really meant to ask was
> how can I unjar
> each entry from a path reference? I've got it working using
> beanshell which
> is rather ugly and unportable. I need this to run on other
> dev boxes without
> the hassle of installing the bsf jar and dependencies and the
> bsh jar. I'm
> really having a hard time here.
>
> Jan.Materne wrote:
> >
> > Just
> > <unjar><fileset/></unjar>
> >
> > Tested example
> > <property name="lib.dir" location="${ant.home}/lib"/>
> > <property name="dest.dir" value="extracted"/>
> >
> > <delete dir="${dest.dir}"/>
> > <mkdir dir="${dest.dir}"/>
> > <unjar dest="${dest.dir}">
> > <fileset dir="${lib.dir}"
> > includes="**/*launcher*.jar,**/*nodeps*.jar"/>
> > </unjar>
> >
> >
> >
> > Jan
> >
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Clifton [mailto:clifton.craig@gmail.com]
> >> Gesendet: Donnerstag, 24. Januar 2008 21:58
> >> An: user@ant.apache.org
> >> Betreff: For each jar in a fileset
> >>
> >>
> >> I need to unjar each jar in a fileset. What's the easiest
> >> approach without
> >> getting into extra libs, scripting and what not?
> >> --
> >> View this message in context:
> >> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
> >> 74819.html
> >> Sent from the Ant - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
> 88491.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: AW: For each jar in a fileset
Posted by Clifton <cl...@gmail.com>.
I'm sorry, yes that works but what I really meant to ask was how can I unjar
each entry from a path reference? I've got it working using beanshell which
is rather ugly and unportable. I need this to run on other dev boxes without
the hassle of installing the bsf jar and dependencies and the bsh jar. I'm
really having a hard time here.
Jan.Materne wrote:
>
> Just
> <unjar><fileset/></unjar>
>
> Tested example
> <property name="lib.dir" location="${ant.home}/lib"/>
> <property name="dest.dir" value="extracted"/>
>
> <delete dir="${dest.dir}"/>
> <mkdir dir="${dest.dir}"/>
> <unjar dest="${dest.dir}">
> <fileset dir="${lib.dir}"
> includes="**/*launcher*.jar,**/*nodeps*.jar"/>
> </unjar>
>
>
>
> Jan
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: Clifton [mailto:clifton.craig@gmail.com]
>> Gesendet: Donnerstag, 24. Januar 2008 21:58
>> An: user@ant.apache.org
>> Betreff: For each jar in a fileset
>>
>>
>> I need to unjar each jar in a fileset. What's the easiest
>> approach without
>> getting into extra libs, scripting and what not?
>> --
>> View this message in context:
>> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
>> 74819.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p15088491.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: For each jar in a fileset
Posted by Ja...@rzf.fin-nrw.de.
Just
<unjar><fileset/></unjar>
Tested example
<property name="lib.dir" location="${ant.home}/lib"/>
<property name="dest.dir" value="extracted"/>
<delete dir="${dest.dir}"/>
<mkdir dir="${dest.dir}"/>
<unjar dest="${dest.dir}">
<fileset dir="${lib.dir}" includes="**/*launcher*.jar,**/*nodeps*.jar"/>
</unjar>
Jan
> -----Ursprüngliche Nachricht-----
> Von: Clifton [mailto:clifton.craig@gmail.com]
> Gesendet: Donnerstag, 24. Januar 2008 21:58
> An: user@ant.apache.org
> Betreff: For each jar in a fileset
>
>
> I need to unjar each jar in a fileset. What's the easiest
> approach without
> getting into extra libs, scripting and what not?
> --
> View this message in context:
> http://www.nabble.com/For-each-jar-in-a-fileset-tp15074819p150
> 74819.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org