No lib folder and no class-path in manifest when compiling a NetBeans project on a machine which just has Ant
Posted on 2008-09-29
I am writing a Java application using NetBeans. As part of an automated build process, I need to be able to build the projects on a machine that does not have NetBeans installed. It has Ant, however.
For now, I am just creating a new Java Desktop Application, which uses Swing.
When I compile using NetBeans (or using Ant on the machine where NetBeans is installed), the manifest.mf file in the jar contains a class-path entry which is not present when installing on the other machine. Also, a lib folder is created with the two utility jars required for Swing.
There is a difference in the steps that Ant performs on each machine.
On NetBeans machine, -do-jar-with-libraries is executed.
On server, -do-jar-with-mainclass is executed.
This appears to be why the extra steps aren't being performed, so how do I get Ant to perform the correct steps?
I don't want to modify any files in the project, but I have had to create a .properties file outside the project anyway to specify libs.swing-app-framework.classpath and libs.CopyLibs.classpath, so if there is something simple I can add to this file that would solve the problem, that would be great.
Something to do with mkdist.available?