Avatar of infrasafe
infrasafe
 asked on

build war in eclipse using ant - remove manifest from war

I have a package that builds a war file using ant in eclipse.  I noticed how it creates, within my war, a META-INF dir and a MANIFEST.MF file displaying the following:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)

This is useless to me and I do not want it included in my war.  I was able to build it some time ago without it including this file.  However, it has appeared now and I am unsure what I had changed to cause it.  I do not have this META-INF dir anywhere in my project and am unsure how to omit its creation and addition to my war.  I am also not sure if it is a setting in eclipse that will remove this from being created.  Let me know if you need any additional info.  Thanks in advance.

packaging.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations>
<archive destination="" exploded="false" name="test.war" used="true">
<folder excludes="" includes="**/*.*" location="WEB-INF" name="WEB-INF" prefix="WEB-INF" project="" projectLocation="WEB-INF" used="true"/>
<folder excludes="" includes="**/*.ocx" location="activex" name="activex" prefix="activex" project="" projectLocation="activex" used="true"/>
<folder excludes="" includes="**/*.jsp" location="pages" name="pages" prefix="WEB-INF/pages" project="" projectLocation="pages" used="true"/>
<folder excludes="" includes="**/*.css" location="style" name="style" prefix="style" project="" projectLocation="style" used="true"/>
<folder excludes="" includes="**/*.*" location="images" name="images" prefix="images" project="" projectLocation="images" used="true"/>
<folder excludes="" includes="**/*.*" location="html" name="html" prefix="" project="" projectLocation="html" used="true"/>
<folder excludes="" includes="**/*.jsp" location="pages/test" name="test" prefix="WEB-INF/pages/test" project="" projectLocation="pages/test" used="true"/>
<folder excludes="" includes="**/*.*" location="WEB-INF/classes" name="classes" prefix="WEB-INF/classes" project="" projectLocation="WEB-INF/classes" used="true"/>
<file location="../ivlib/ivlib.jar" name="ivlib.jar" prefix="WEB-INF/lib" project="ivlib" projectLocation="ivlib.jar" used="true"/>
</archive>
</configurations>


packaging-build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="Packaging Generator" default="_packaging_generation_">
<target name="_packaging_generation_" depends="N55555"/>
<target name="N55555" description="test.war">
<jar destfile="test.war">
<zipfileset dir="../ivlib" prefix="WEB-INF/lib">
<include name="ivlib.jar"/>
</zipfileset>
<zipfileset dir="WEB-INF" prefix="WEB-INF" includes="**/*.*"/>
<zipfileset dir="activex" prefix="activex" includes="**/*.ocx"/>
<zipfileset dir="pages" prefix="WEB-INF/pages" includes="**/*.jsp"/>
<zipfileset dir="style" prefix="style" includes="**/*.css"/>
<zipfileset dir="images" prefix="images" includes="**/*.*"/>
<zipfileset dir="html" includes="**/*.*"/>
<zipfileset dir="pages/test" prefix="WEB-INF/pages/test" includes="**/*.jsp"/>
<zipfileset dir="WEB-INF/classes" prefix="WEB-INF/classes" includes="**/*.*"/>
</jar>
</target>
</project>
Editors IDEsJavaJava EE

Avatar of undefined
Last Comment
infrasafe

8/22/2022 - Mon
TrekkyLeaper

The manifest is part of all java archive formats. You should not be removing it. Why do you want to?
infrasafe

ASKER
It is fine if ant wants to create it some other place.  I just don't want it to be forced into my war.  It was never there before and I don't want to have unnecessary files included in my war.  The version of ant that it was built with is of no use to anyone.
ASKER CERTIFIED SOLUTION
TrekkyLeaper

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
infrasafe

ASKER
Something in my configuration changed that caused it to start including the directory.  I just never figured out what.  I have since started from scratch with eclipse and set everything up with my project all over again.  I have it building without the meta-inf directory.  I will just be aware of what I settings I am modifying in the future so it doesn't happen again.  

Thank you for your feedback.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes