Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Create WEB-INF/lib based on path-structure

Create WEB-INF/lib based on path-structure

2007-07-10       - By Prashant Reddy
Reply:     1     2     3     4     5     6     7     8     9  

On Tue, 2007-07-10 at 14:29 +0800, hezjing wrote:
>> Based on http://ant.apache.org/manual/CoreTypes/fileset.html, how do
>> we know the element supports "refid" attribute?

You mean the 'id' attribute, right ?

Yes you are correct the documentation of fileset does not specify
support for id attribute. While using <patternset id="base.path"> inside
a <fileset> as the sample documented, makes WAR task give out error
"base.path doesn't denote a zipfileset or a fileset"

> > >   <path id="base.path">
> > >   <fileset dir="lib">
> > >   <include name="**/*.jar"/>
> > >   </fileset>
> > >   </path>

However, adding "id" attribute to <fileset> seems to be allowed.

<project name="wartasktest">

<fileset dir="lib" id="base.path">
  <include name="**/*.jar"/>
</fileset>

<target name="dist">
  <war jarfile="${war.filename}" webxml="${WEB-INF}/web.xml">
           <lib refid="base.path"/>
       </war>
</target>
</project>

I have tried this out, and executing target 'dist' did create WAR file
including all the jars referenced in base.path in WEB-INF/lib. I am
using ant version 1.6.2.

--

-Prashant

Don't upload, just share : www.dekoh.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.