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.

Bug 165237 - maven applies stale profile
Summary: maven applies stale profile
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P4 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 168489 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-15 08:34 UTC by catweasle
Modified: 2009-08-13 14:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description catweasle 2009-05-15 08:34:22 UTC
I have a project for which a profile is selected for buildinging.
I modify the pom and remove the profile.
I can not select/unselect the profile anymore from the right click profile menu on the project,
but it is still applied when i build ( -Pdev,ud-dev,ud option used in my case, ud-dev is the stale profile)
Comment 1 catweasle 2009-05-15 08:37:48 UTC
[WARNING] 
        Profile with id: 'ud-dev' has not been activated.
Comment 2 Milos Kleint 2009-05-15 08:59:32 UTC
you mean you configured the project actions to activate a profile and expect the ide to recognize that the profile is gone?
Comment 3 catweasle 2009-05-18 07:42:47 UTC
That is correct.

I added the profile using the pom (guess this is the intended way for adding profiles).
I activated the profile using myMavenProject>right click menu>profiles>listOfProfiles
I deleted the profile using the pom.
Netbeans keeps applying the deleted profile and as a user I can not deactivate it, as it does not appear in the toggle
on/of menu anymore (unless i removed it from var/attributes.xml).
I would indeed expect netbeans to detect that the profile is stale and remove it from the active profile list.
Comment 4 Milos Kleint 2009-05-20 12:32:10 UTC
detecting a missing profile is not as easy as it sounds..
Comment 5 Milos Kleint 2009-07-14 07:38:12 UTC
*** Issue 168489 has been marked as a duplicate of this issue. ***
Comment 6 syntax 2009-07-14 11:29:38 UTC
Rather than actively detecting missing profiles, can't Netbeans gather the list of available profiles at Build time and
remove any profiles from "-Pxxx" which no longer exist?
Comment 7 syntax 2009-07-22 15:49:42 UTC
Workaround:

 * Rename an existing profile to the name of the removed profile
 * Unselect the profile in Netbeans
 * Rename profile to the new name

If the old profile isn't selected in the GUI, select it then unselect it.
Comment 8 Milos Kleint 2009-08-13 14:57:29 UTC
I've removed the profiles> popup submenu and use Configurations consistently, if a active profile is missing there, it's
either reset (if based solely on the pom) or editable if configuration setup by the user.
The UI for configurations in the project properties is simplified now.

I consider the issue fixed.

please note that to have multiple profiles activated now, you need to edit the configurations, only single profiles are
listed automatically for activation.