Thats good news.
The other benefit is that you can actually have a remote chance of knowing where a jar came from instead of having a gajillion jar files all in web-inf\lib
Printable View
Thats good news.
The other benefit is that you can actually have a remote chance of knowing where a jar came from instead of having a gajillion jar files all in web-inf\lib
Quick question.
Which ant task are you using to generate lib subdirectory in ear file and put there *.jar files.
Does ear task have such functionality?
<copy> and then <ear>
After playing a little I am sticking with zipfileset with attribute lib or lib/spring or lib/whatever.
Like this
Wouldn't be nice to have a dedicated lib element in ear target as we have in war?Code:<target name="make-ear" description="Should be called either from ear or ear-compile">
<mkdir dir="${distribution.dir}" />
<ear destFile="${distribution.dir}/${ear.name}" appxml="${meta-inf.dir}/application.xml">
<!-- jars to be included from these dirs -->
<fileset dir="${common.jar.dir}" />
<fileset dir="${dao.jar.dir}" />
<fileset dir="${facade.jar.dir}" />
<fileset dir="${webapp.war.dir}" />
<!-- include jboss-app.xml -->
<metainf dir="${meta-inf.dir}">
<include name="jboss-app.xml" />
</metainf>
<!-- here you go!!! -->
<zipfileset dir="${lib.dir}" prefix="lib"/>
</ear>
</target>
Code:<war destfile="myapp.war" webxml="src/metadata/myapp.xml">
<fileset dir="src/html/myapp"/>
<lib dir="thirdparty/libs">
<exclude name="jdbc1.jar"/>
</lib>
</war>