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 246790 - Maven run use the default configuration/profile though an additional one is selected
Summary: Maven run use the default configuration/profile though an additional one is s...
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.1
Hardware: PC Windows 8 x64
: P1 normal with 2 votes (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 247168 247327 247909 248746 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-31 20:25 UTC by lhochet
Modified: 2015-06-04 13:30 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project showing that configurations other than default are not used to run the application (3.49 KB, application/x-zip)
2014-08-31 20:25 UTC, lhochet
Details
proposed patch (874 bytes, application/octet-stream)
2014-08-31 20:42 UTC, lhochet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lhochet 2014-08-31 20:25:21 UTC
Created attachment 148967 [details]
sample project showing that configurations other than default are not used to run the application

Product Version: NetBeans IDE Dev (Build 201408310001)
Java: 1.8.0_20; Java HotSpot(TM) 64-Bit Server VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Windows 8 version 6.2 running on amd64; Cp1252; fr_FR (nb)

If a Maven project has a default configuration with some run parameters, and another 'test' configuration with some slightly different ones, then only the default configuration is run no matter that the 'test' one is selected or not.

To reproduce use the attached project then select the test configuration then run. It should print arg = [-test]
Comment 1 lhochet 2014-08-31 20:42:42 UTC
Created attachment 148969 [details]
proposed patch

This issue seems related to the changes done for #229192 and #34300.
Attached is a small patch that first attempt to read the profile from a dedicated file for that profile then if not found to try to read the profile from the profiles section of the default, like what is done slightly above in getRawMappings().
Comment 2 lhochet 2014-08-31 20:45:31 UTC
> This issue seems related to the changes done for #229192 and #34300.
the second one should be #246300
Comment 3 lhochet 2014-09-16 15:11:18 UTC
the issue is also in Netbeans 8.0.1
Comment 4 peathal 2014-10-16 20:11:27 UTC
*** Bug 247909 has been marked as a duplicate of this bug. ***
Comment 5 Tomas Stupka 2014-10-26 20:11:19 UTC
thanks for the patch - it works, but before applying would still like to have a look on how the issues  #229192 and #246300 caused the problem and if the fix shouldn't be better made at some other place.
Comment 6 Tomas Stupka 2014-10-31 12:52:36 UTC
fixed in core-main #ba354948b3ae
Comment 7 Tomas Stupka 2014-10-31 13:08:39 UTC
*** Bug 247327 has been marked as a duplicate of this bug. ***
Comment 8 Quality Engineering 2014-11-01 04:46:20 UTC
Integrated into 'main-silver', will be available in build *201411010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ba354948b3ae
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #246790 - Maven run use the default configuration/profile though an additional one is selected
Comment 9 lhochet 2014-11-03 10:49:51 UTC
Thanks (fix verified in NetBeans IDE Dev (Build 201411030002) with the project on which I first noticed this).
Comment 10 Tomas Stupka 2014-11-07 14:05:38 UTC
*** Bug 247168 has been marked as a duplicate of this bug. ***
Comment 11 Tomas Stupka 2014-11-10 15:08:52 UTC
backported to releases #b2309713dc06
Comment 12 Quality Engineering 2014-11-10 23:21:27 UTC
Integrated into 'releases/release801', will be available in build *201411102027* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/b2309713dc06
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #246790 - Maven run use the default configuration/profile though an additional one is selected
Comment 13 Tomas Stupka 2015-06-04 13:30:47 UTC
*** Bug 248746 has been marked as a duplicate of this bug. ***