Packaging in netbeans broken because of jme2-compile library

I have been struggling to get netbeans to copy the libraries to the dist/lib folder so I can run it as a jar.

The best I can come up with is this

Created dir: /home/neill/netbeans/racer/dist

/home/neill/jme2/jme2/build is a directory or can't be read. Not copying the libraries.

Building jar: /home/neill/netbeans/racer/dist/racer.jar

Not copying the libraries.

the jme2-compile library does not contain any jars but the classpath is set to the build directory, as it is in the tutorial.

because of this netbeans will not copy the libraries to the dist/lib folder

What can I do about this please?

Expand the build.xml file, there should be several options one being to dist-all; that will create the build directory…

Thanks for the reply

I have looked through build.xml and can't see a dist-all option

here is my build.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- You may freely edit this file. See commented blocks below for -->

<!-- some examples of how to customize the build. -->

<!-- (If you delete it and reopen the project it will be recreated.) -->

<project name="racer" default="default" basedir=".">

    <description>Builds, tests, and runs the project racer.</description>

    <import file="nbproject/build-impl.xml"/>


    There exist several targets which are by default empty and which can be

    used for execution of your tasks. These targets are usually executed

    before and after some main targets. They are:

      -pre-init:                called before initialization of project properties

      -post-init:                called after initialization of project properties

      -pre-compile:              called before javac compilation

      -post-compile:            called after javac compilation

      -pre-compile-single:      called before javac compilation of single file

      -post-compile-single:      called after javac compilation of single file

      -pre-compile-test:        called before javac compilation of JUnit tests

      -post-compile-test:        called after javac compilation of JUnit tests

      -pre-compile-test-single:  called before javac compilation of single JUnit test

      -post-compile-test-single: called after javac compilation of single JUunit test

      -pre-jar:                  called before JAR building

      -post-jar:                called after JAR building

      -post-clean:              called after cleaning build products

    (Targets beginning with '-' are not intended to be called on their own.)

    Example of inserting an obfuscator after compilation could look like this:

        <target name="-post-compile">


                <fileset dir="${build.classes.dir}"/>



    For list of available properties check the imported

    nbproject/build-impl.xml file.

    Another way to customize the build is by overriding existing main targets.

    The targets of interest are:

      -init-macrodef-javac:    defines macro for javac compilation

      -init-macrodef-junit:    defines macro for junit execution

      -init-macrodef-debug:    defines macro for class debugging

      -init-macrodef-java:      defines macro for class execution

      -do-jar-with-manifest:    JAR building (if you are using a manifest)

      -do-jar-without-manifest: JAR building (if you are not using a manifest)

      run:                      execution of project

      -javadoc-build:          Javadoc generation

      test-report:              JUnit report generation

    An example of overriding the target for project execution could look like this:

        <target name="run" depends="racer-impl.jar">

            <exec dir="bin" executable="launcher.exe">

                <arg file="${dist.jar}"/>



    Notice that the overridden target depends on the jar target and not only on

    the compile target as the regular run target does. Again, for a list of available

    properties which you can use, check the target you are overriding in the

    nbproject/build-impl.xml file.



well I've partially solved the problem by creating a .jar file out of the contents of jme2/build, placing it in the build dir and replacing the build mfolder with thge build jar in the jme2-compile library

basixs tried to tell You the following:

Make sure You set up jme with netbeans as mentioned in the wiki (wiki page for netbeans > 6.0 !)

this sets up netbeans to treat jme as a custom project and use the existing ant script instead of creating it's own.

  • On the projects tab in netbeans expand the jme node (left click the triangle left to the project name)
  • if set up properly You should see at least a folder "src" and a file "build.xml"
  • right click "build.xml" and choose "Run Target" from the context menue
  • another context with the targets from build.xml opens
  • choose "dist-all" then do the same with target "dist-test"

    this should give You all the jme .jar's in the jme/target directory


I've generated the jar files, they are in the jme/target directory. What should I set up in Netbeans next to generate a fully functional jar file for my project?

I have everything set up like in the svn tutorial for netbeans and getting the error mentioned in the first post. The jme jars aren't added to the generated project jar. What should i configure to obtain that?

Any help appreciated