tags:

views:

40

answers:

0

Hi there! I need to run single file test of a maven 2 project (project A). The problem is that I need the full classpath of the parent pom (project B) of the named project to execute the test.

When I run the single test, it fails because the classpath contains only the files referenced by project A.

Solution in eclipse: I've started the test by creating a run configuration and adding a variable, which contains the full classpath of project B, to the config.

In NB I've got a variable in build.properties file which contains the full classpath

Solution in netbeans: I load variable in the build.properties file with the maven-properties-plugin and modify the code from maven-surefire-plugin in the pom, so that i can add the full-classpath in the variable as "AdditionalClasspathElement" to the plugin classpath. ..Yes very complicated and very costly by over 100 pom files..

So do you have any other easier idea how I can run the test from within netbeans 6.7? And why isn't it possible to add variables to the run_configuration in NB?

Please help me, I would love to use NB for my daily business, Chris