wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes META-INF problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "META-INF problems" Watch "META-INF problems" New topic

META-INF problems

Vinicius Carvalho
Ranch Hand

Joined: Dec 07, 2004
Posts: 61
Hello there! I'm trying to add my own meta-inf to a war file, but it always get override by the default generated by ant. Here's my target definition:

<target name="retiradaEdital-war" depends="init">
<javac srcdir="${retiradaEdital.dir}/src" destdir="${retiradaEdital.webinf.dir}/classes" verbose="true" version="1.4">
<classpath refid="lib">
<war destfile="${temp.dir}/${retiradaEdital.war.file}" webxml="${retiradaEdital.dir}/web/WEB-INF/web.xml" >
<metainf file="${retiradaEdital.metainf.dir}/MANIFEST.MF"></metainf>
<webinf dir="${retiradaEdital.webinf.dir}">
<exclude name="**/web.xml" />
<exclude name="classes/**" />
<exclude name="lib/**" />
<include name="**/*.tld" />
<include name="**/*.xml" />
<classes dir="${retiradaEdital.webinf.dir}/classes" />
<fileset dir="${retiradaEdital.web.dir}">
<include name="**/*" />
<exclude name="WEB-INF/**/*" />
<exclude name="lib/**/*" />
<exclude name="classes/**/*" />


Any reasons why?


Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Looks like you're trying to add MANIFEST.MF.

From the ant manual on war task, blurb on metainf:

The nested metainf element specifies a FileSet. All files included in this fileset will end up in the META-INF directory of the war file. If this fileset includes a file named MANIFEST.MF, the file is ignored and you will get a warning.

[ October 04, 2005: Message edited by: Carol Enderlin ]
Consider Paul's rocket mass heater.
subject: META-INF problems
Similar Threads
Test war or jar with JBOSS
Bean could not be loaded by jsp
Strange Ant Behavior
Error while running "war" task (Resolved)
class files not in the War