I have the following goal 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 great by opening manifest.mf after Clean and Build inside Netbeans show all of my additional attributes that I added. However, when I open the 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 job perfectly when I had two packages in one project. One package was all the material of the library that I am going to take in other projects, so I decided to split it into another project so that I could build a library jar myself. Now I have this problem. This happens both when compiling the library on my own, and in my other project, which depends on it.
java manifest netbeans ant netbeans-7
Logan
source share