A
Andrew McGhie
Hello,
I searched the groups and found a posting way back in 2003 which said
it couldn't be done, but I'm hoping more recent versions of ant this
is now possible. What I'm trying to do is declare a fileset once and
then reference it in my classpath and also copy the referenced jar
files to the root lib directory of my webapp. This is part of my
build.xml file:
This doesn't appear to work. Can someone help me in telling me what
I'm doing wrong?
Many Thanks
Andy
I searched the groups and found a posting way back in 2003 which said
it couldn't be done, but I'm hoping more recent versions of ant this
is now possible. What I'm trying to do is declare a fileset once and
then reference it in my classpath and also copy the referenced jar
files to the root lib directory of my webapp. This is part of my
build.xml file:
Code:
<project>
<!-- Hibernate Jars -->
<fileset id="hibernate" dir="${hibernate.dir}">
<filename name="lib/ant-antlr-1.6.5.jar" />
<filename name="lib/antlr-2.7.6.jar" />
<filename name="lib/asm.jar" />
<filename name="lib/asm-attrs.jar" />
<filename name="lib/cglib-2.1.3.jar" />
<filename name="lib/commons-collections-2.1.1.jar" />
<filename name="lib/commons-logging-1.0.4.jar" />
<filename name="lib/dom4j-1.6.1.jar" />
<filename name="hibernate3.jar" />
<filename name="lib/jta.jar" />
<filename name="lib/log4j-1.2.11.jar" />
</fileset>
...
<path id="classpath">
<pathelement location="${servlet.jar}"/>
<pathelement location="${jsp.jar}"/>
<pathelement location="${jstl.jar}"/>
<fileset refid="hibernate" />
</path>
..
<target name="populateDirectories" depends="makeDirectories">
...
<copy todir="${build}/${appName}/WEB-INF/lib" verbose="true">
<fileset refid="hibernate"/>
</copy>
..
</target>
</project>
This doesn't appear to work. Can someone help me in telling me what
I'm doing wrong?
Many Thanks
Andy