You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Igor Semenko <Ig...@kyiv.vdiweb.com> on 2005/12/22 17:46:42 UTC
Creating war/ear directly from path
Hi, all.
In our build file we use path definition like this:
<path id="ear.libs">
<fileset dir="${lib.dir}">
<include name="asm/jars/*.jar" />
</fileset>
</path>
When building ear file we copy all those files into temp dir using flattenmapper:
<copy todir="temp_libs">
<mapper type="flatten" />
<fileset refid="ear.libs" />
</copy>
And then create ear including files from temp_lib dirs:
<ear ..>
<fileset dir="temp_libs">
<include name="*.jar" />
</fileset>
</ear>
Is it possible to somehow skip copying jar files into temp directory and include them into ear directly based on path declared earlier?
Thanks.
Igor Semenko
Senior Java Developer
Vested Development Inc.
+38 (044) 496-77-20
ICQ: 105700076
mailto: IgorSe@kiev.vdiweb.com
http://www.vdiweb.com <http://www.vdiweb.com>
Re: Creating war/ear directly from path
Posted by Steve Loughran <st...@apache.org>.
Igor Semenko wrote:
> Hi, all.
>
>
>
> In our build file we use path definition like this:
> <path id="ear.libs">
>
> <fileset dir="${lib.dir}">
>
> <include name="asm/jars/*.jar" />
>
> </fileset>
>
> </path>
>
>
>
> When building ear file we copy all those files into temp dir using flattenmapper:
>
> <copy todir="temp_libs">
>
> <mapper type="flatten" />
>
> <fileset refid="ear.libs" />
>
> </copy>
>
>
>
> And then create ear including files from temp_lib dirs:
>
> <ear ..>
>
> <fileset dir="temp_libs">
>
> <include name="*.jar" />
>
> </fileset>
>
> </ear>
>
>
>
> Is it possible to somehow skip copying jar files into temp directory and include them into ear directly based on path declared earlier?
No. Its been discussed, having <lib> or other filesets do mapping
internally. But I just copy them into a dir. Which has some benefits; if
you are signing your jars its a place to sign them without touching the
originals, and you can see exactly what goes in there, so catching
copies of servlet.jar that shouldnt be there.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org