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.
My JUnit classes can work in two ways and the selected way is defined by specifying a profile or not. I open the project "properties" page, select "Actions", select the "Test file" action and add a profile, but when I run the test from menu "Run->Test file (ctrl-f6)" I see in the generated log that the profile is not really active.
I also found that the following plug-in configuration is not being taken into account: <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <!-- redirect log output to files in target/surefire-reports --> <redirectTestOutputToFile>true</redirectTestOutputToFile> <systemProperties> <property> <name>my.property.name</name> <value>blablabla</value> </property> </systemProperties> </configuration> </plugin> In the test code I found that the system property "my.property.name" is not set.
first we've done the system properties configuration parsing wrong. And then we've also started caching some models (weak referencing them) which caused the profiles not to show as activated. http://hg.netbeans.org/main/rev/87231505d3b5 http://hg.netbeans.org/main/rev/2c8225d219e3 these 2 changeset shall fix both. Please verify in the upcoming dev builds (the exact number will be added to the issue), we might be able to backport this to 6.7..
*** Issue 168041 has been marked as a duplicate of this issue. ***
Integrated into 'main-golden', will be available in build *200907040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/87231505d3b5 User: Milos Kleint <mkleint@netbeans.org> Log: #168036 when retrieving properties in plugin configuration consider this pattern <property><key>foo</key><value>bar</bar></property additionally use a new instance of embedder for use in RunConfig to prevent retrieving a cached instance that might have different profiles activated.
Reporter, would you verify the fix in the latest trunk build that is available here: http://bits.netbeans.org/dev/nightly/latest/? We will put the fix in patch1 for Nb 6.7. Thanks
v.
The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/49002777df2c