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 241337

Summary: Changes at configuiration properties directly at nb-configuration.xml file are not propagated automatically
Product: projects Reporter: Michel Graciano <hmichel>
Component: MavenAssignee: Milos Kleint <mkleint>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: sample project

Description Michel Graciano 2014-02-03 13:28:00 UTC
[ BUILD # : 85f20076c6c0 ]
[ JDK VERSION : 1.7.0_40 ]

Build 20140130-85f20076c6c0

STEPS:
   * Create a configuration with some custom properties defined, e.g using the
sample configuration [1].
   * Execute some goal
   * Change the property value manually (directly in the nb-configuration.xml
file, not using the UI)
   * Run some goal again

ACTUAL:
   The property is correctly used in the first run but never updated if changed
by hand.

EXPECTED:
   The property should be updated after editing the xml file.

WORKAROUND:
   Use the UI to change the property value will do the trick.

[1]
<config-data xmlns="http://www.netbeans.org/ns/maven-config-data/1">
    <configurations>
        <configuration id="development-it" profiles="development
arquillian-wildfly-remote">
            <property name="arquillian.test.database">2</property>
        </configuration>
    </configurations>
</config-data>
Comment 1 Milos Kleint 2014-02-03 13:35:44 UTC
reloading a project after nb-configuration.xml file (or pom.xml) change is an async operation. Does waiting help?

Does a manual "Reload POM" popup action execution fix the problem?

does rerun mean clicking the action in output toolbar or right click on project in Project's view (or main menu action)
Comment 2 Milos Kleint 2014-02-03 14:02:18 UTC
Created attachment 144734 [details]
sample project

I've tried to create a sample project where pom.xml's <name> element contains ${foo} which in turn is defined in a nb-configuration.xml. When I activate the configuration, I see the expression being evaluated to "bar", when I change that manually in the nb-configuration.xml file, it changes in the view as well. (macosx + jdk 1.7 + latest dev sources)


BTW Do you see your property at the beginning of the build output?
Comment 3 Milos Kleint 2014-02-05 13:28:43 UTC
http://hg.netbeans.org/core-main/rev/152f2b48e55f

we've reset the list of configurations, but still used the old instance for active configuration
Comment 4 Quality Engineering 2014-02-07 02:39:31 UTC
Integrated into 'main-silver', will be available in build *201402070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/152f2b48e55f
User: Milos Kleint <mkleint@netbeans.org>
Log: #241337 when configurations get reloaded, we forgot that the active instance was not reset as well, thus holding still the old values.