W
Werner Butscher
Hello everyone,
I use ant for building my jar and war files. Since I added two
property files directly to the WEB-INF directory of my servlet, the
war file is not packed correctly anymore.
My directoy structure should be like this:
/META-INF
/WEB-INF
classes/
lib/
web.xml
log4j.properties
database.props
The problem is, the last two files will be packed directly at root
level instead at /WEB-INF
I tried all combinations of filesets, patternsets, revied older build
files etc but could not find the reason. The target in the current
build file looks like this:
(where build.dir is WEB-INF)
<target name="war" depends="compile">
<delete dir="${war.dir}"/>
<mkdir dir="${war.dir}"/>
<war warfile="${war.dir}/${project}.war"
webxml="${build.dir}/web.xml">
<fileset dir="${build.dir}">
<exclude name="web.xml"/>
<exclude name="**/*.bak"/>
<exclude name="**/*.class"/>
<exclude name="**/*.java"/>
<exclude name="lib/"/>
<exclude name="classes/"/>
<include name="**/*.props"/>
<include name="**/*.properties"/>
</fileset>
<classes dir="${build.dir}/classes"/>
<lib dir="${lib.dir}">
<include name="*.jar"/>
</lib>
<lib dir="${servletlibs.dir}">
<include name="*.jar"/>
</lib>
<lib dir="${cmlib.dir}">
<include name="*.jar"/>
</lib>
<lib dir="${cmclasses.dir}">
<include name="*.jar"/>
</lib>
</war>
</target>
I also checked the compile task and removed it, still the same, the
problem must be somewhere here...
Any help would be appreciated... :-}
Werner
I use ant for building my jar and war files. Since I added two
property files directly to the WEB-INF directory of my servlet, the
war file is not packed correctly anymore.
My directoy structure should be like this:
/META-INF
/WEB-INF
classes/
lib/
web.xml
log4j.properties
database.props
The problem is, the last two files will be packed directly at root
level instead at /WEB-INF
I tried all combinations of filesets, patternsets, revied older build
files etc but could not find the reason. The target in the current
build file looks like this:
(where build.dir is WEB-INF)
<target name="war" depends="compile">
<delete dir="${war.dir}"/>
<mkdir dir="${war.dir}"/>
<war warfile="${war.dir}/${project}.war"
webxml="${build.dir}/web.xml">
<fileset dir="${build.dir}">
<exclude name="web.xml"/>
<exclude name="**/*.bak"/>
<exclude name="**/*.class"/>
<exclude name="**/*.java"/>
<exclude name="lib/"/>
<exclude name="classes/"/>
<include name="**/*.props"/>
<include name="**/*.properties"/>
</fileset>
<classes dir="${build.dir}/classes"/>
<lib dir="${lib.dir}">
<include name="*.jar"/>
</lib>
<lib dir="${servletlibs.dir}">
<include name="*.jar"/>
</lib>
<lib dir="${cmlib.dir}">
<include name="*.jar"/>
</lib>
<lib dir="${cmclasses.dir}">
<include name="*.jar"/>
</lib>
</war>
</target>
I also checked the compile task and removed it, still the same, the
problem must be somewhere here...
Any help would be appreciated... :-}
Werner