Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 168036 - run or debug JUnit class does not use the specified Maven profiles
run or debug JUnit class does not use the specified Maven profiles
Product: projects
Classification: Unclassified
Component: Maven
All All
: P3 (vote)
: 6.x
Assigned To: Milos Kleint
: 168041 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2009-07-02 14:32 UTC by ccronemberger
Modified: 2009-07-20 14:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description ccronemberger 2009-07-02 14:32:19 UTC
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.
Comment 1 ccronemberger 2009-07-02 14:36:35 UTC
I also found that the following plug-in configuration is not being taken into account:

                    <!-- redirect log output to files in target/surefire-reports -->

In the test code I found that the system property "" is not set.
Comment 2 Milos Kleint 2009-07-03 13:08:42 UTC
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.

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..
Comment 3 Milos Kleint 2009-07-03 13:11:33 UTC
*** Issue 168041 has been marked as a duplicate of this issue. ***
Comment 4 Quality Engineering 2009-07-04 06:27:21 UTC
Integrated into 'main-golden', will be available in build *200907040200* on (upload may still be in progress)
User: Milos Kleint <>
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.
Comment 5 Petr Blaha 2009-07-07 11:20:34 UTC
Reporter, would you verify the fix in the latest trunk build that is available here: We will put the fix in patch1 for Nb 6.7. Thanks
Comment 6 Jaroslav Pospisil 2009-07-09 08:54:23 UTC
Comment 7 pgebauer 2009-07-09 16:46:22 UTC
The fix has been ported into the release67_fixes repository.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo