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 236928 - When using configuration with multiple profiles turned on, properties are not resolved in Effective view of pom.xml
Summary: When using configuration with multiple profiles turned on, properties are not...
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-09 09:26 UTC by OndrejM
Modified: 2013-11-22 13:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Configuration with 2 profiles - property webappDirectory is not resolved, although specified in ondrej.mihalyi-cbn-jboss profile in settings.xml (63.32 KB, image/png)
2013-10-09 09:26 UTC, OndrejM
Details
Configuration with single profile - property webappDirectory is correctly resolved from ondrej.mihalyi-cbn-jboss profile specified in settings.xml (77.45 KB, image/png)
2013-10-09 09:28 UTC, OndrejM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description OndrejM 2013-10-09 09:26:21 UTC
Created attachment 140933 [details]
Configuration with 2 profiles - property webappDirectory is not resolved, although specified in ondrej.mihalyi-cbn-jboss profile in settings.xml

When I select a configuration with only 1 maven profile, click on Effective view in pom.xml, I can see that maven properties are properly resolved from my settings.xml, where I specified them in selected profile.

But when I add another profile into the Configuration, in Effective view of pom.xml, I can only see ${propertyName} - ie. property is unresolved.

This does not ruin the build, because properties are resolved correctly when maven is executed. But I'm working with Maven WAR project, which I deploy to externally running application server as exploded folder.

When the properties are resolved correctly, Netbeans automatically deploys all changed files to the location specified in property (which sets value of webappDirectory of WAR plugin).
When the properties are not resolved, files are correctly deployed only when executing Run action.
Comment 1 OndrejM 2013-10-09 09:28:47 UTC
Created attachment 140934 [details]
Configuration with single profile - property webappDirectory is correctly resolved from ondrej.mihalyi-cbn-jboss profile specified in settings.xml
Comment 2 Milos Kleint 2013-10-09 12:58:06 UTC
http://hg.netbeans.org/core-main/rev/54025f6d791c

fixes the problem in upcoming dev builds.
the problem was that while the UI tried to recognize both space and comma as profile separator (but failed) the backend stores and reads only space separated list. so if you would have used a space as separator it would work by coincidence.

a workaround for you is to modify the nbconfiguration.xml files and replace the value for profile attribute to contain space as separator not comma.
Comment 3 OndrejM 2013-10-10 09:32:18 UTC
Thanks for the fix and info!
The workaround helped, I did not know that also spaces may separate profiles.

Maybe a better UI to select profiles for configuration would help, so that user don't need to think about separators...
Comment 4 Quality Engineering 2013-10-12 03:59:44 UTC
Integrated into 'main-silver', will be available in build *201310120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/54025f6d791c
User: Milos Kleint <mkleint@netbeans.org>
Log: #236928 fix the profile splitting regular expression
Comment 5 Tomas Danek 2013-11-06 13:52:00 UTC
verified in 

Product Version: NetBeans IDE Dev (Build 201311040001)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.9 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/dev
Cache directory: /Users/tomas/Library/Caches/NetBeans/dev
Comment 6 Milos Kleint 2013-11-13 10:30:45 UTC
http://hg.netbeans.org/releases/rev/00a583d59c78
Comment 7 Tomas Danek 2013-11-22 13:31:28 UTC
verified in 74 patch 1

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.9 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/7.4
Cache directory: /Users/tomas/Library/Caches/NetBeans/7.4