Netbeans 7: Why is my edited manifest not being included?

ant, java, manifest, netbeans, netbeans-7

Solution

I've fixed it by opening `nbproject/project.properties` and adding `manifest.file=manifest.mf` to the end. Simple as that.

Problem

I have the following target in my `build.xml`: ``` <target name="-pre-compile"> <property file="build.properties"/> <buildnumber file="build.version"/> <tstamp> <format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss"/> </tstamp> <manifest file="manifest.mf"> <attribute name="MAJOR" value="${version.major}"/> <attribute name="MINOR" value="${version.minor}"/> <attribute name="RELEASE" value="${release}"/> <attribute name="BUILD" value="${build.number}"/> <attribute name="BUILD-DATE" value="${timestamp}"/> <attribute name="PROTOCOL" value="${protocol}"/> <attribute name="APPCODE" value="${appcode}"/> </manifest> </target> ``` It works fine, opening `manifest.mf` after a Clean and Build within Netbeans shows all my extra attributes that I've added. However, when I open my jar file I see that it just contains the default stuff: ``` Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: 1.7.0-b147 (Oracle Corporation) ``` I had this working fine before when I had two packages in one project. The one package was all library stuff that I'm gonna be taking to other projects, so I decided to split it out into another project so I could build the library jar by itself. Now I have this problem. It occurs both when I compile the library on its own as well as my other project that depends on it.

Original source