This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using the following snippet (in nbproject/project.xml): <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2"> <compilation-unit> <package-root>${project.dir}/src/main/java</package-root> <source-level>1.5</source-level> </compilation-unit> <compilation-unit> <package-root>${project.dir}/src/test/java</package-root> <unit-tests/> <!--classpath mode="compile">src/main/java;build/lib/test/log4j-1.2.15.jar;build/lib/test/testng-5.6-jdk15.jar;build/lib/test/catalina-5.5.26.jar;build/lib/test/commons-logging-1.1.1.jar;build/lib/test/catalina-optional-5.5.26.jar;build/lib/test/selenium-java-client-driver-1.0-beta-1.jar</classpath--> <classpath mode="compile">src/main/java;build/lib/test/'*'</classpath> <source-level>1.5</source-level> </compilation-unit> </java-data> ...the IDE will not be able to set up the classpath when the uncommented classpath declaration is used (<classpath mode="compile">src/main/java;build/lib/test/'*'</classpath>) From the command line, this works fine. Ie, if you call javac with the following argument (from one of the package folders of the test source tree): $ javac -cp ../../../../../../../build/lib/test/'*' *.java ...then the classpath wildcard expansion works as expected. (Note: I have also tried without the single quotes around the asterisk (*) in nbproject/project.xml, but without luck) This limitation is quite irritating when you retrieve dependencies with build tools such as Ivy (http://ant.apache.org/ivy), since each time you add a new dependency jar file in the ivy.xml file, you will have to add the path to this jar file in the NB project file as well. The common strategy with tools such as Maven/Ivy is to group dependencies in configurations such as "compile","test","runtime" (etc), which (eg) means that all dependencies needed for compiling the test source can be retrieved into a single directory (say, builddeps/test) If NB could use wildcards for the classpath, you would be able to tell NB something like: "just use whatever jar files you find in builddeps/test as the classpath for the test source, and whatever jar files you find in builddeps/compile as the classpath for the main source". That would really make life easier for those who retreieve dependencies with Ant+Ivy, but unfortunately, it doesn't seem to work right now.
'.../*.jar' doesn't work for you?
Nope. Neither does 'build/lib/test/*' 'build/lib/test/*.jar' 'build/lib/test/'*.jar' And that's at the "hackish" level (modifying the project.xml file in editor) From Project->Properties->Java Sources Classpath->Add JAR/Folder, there is only the option to choose a directory (where compiled classes are stored) or individual .jar files. In short, the filechooser also has to support wildcards if we don't want to require the users to hack the project.xml file to use wildcards.
Jesse, was the <classpath> element designed to understand wildcards? If not, this is not a defect but RFE.
No, it is not supported. You may have better luck using the new experimental http://wiki.netbeans.org/AutomaticProjects *** This issue has been marked as a duplicate of 116185 ***