This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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 ]
I agree. Here's the link:
subject: META-INF problems
It's not a secret anymore!