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 242468 - javase project configurations not properly honored.
Summary: javase project configurations not properly honored.
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 8.0
Hardware: PC Windows 7 x64
: P1 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords: 8.0_HR_FIX
Depends on:
Blocks:
 
Reported: 2014-02-28 20:42 UTC by emiddio
Modified: 2014-03-12 02:47 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
project.properties (3.35 KB, text/plain)
2014-03-03 21:23 UTC, emiddio
Details
configs/ file - SOAP.properties (60 bytes, text/plain)
2014-03-03 21:24 UTC, emiddio
Details
nbrpoject folder zip file (38.30 KB, application/octet-stream)
2014-03-04 19:32 UTC, emiddio
Details
default config setup (240.26 KB, image/jpeg)
2014-03-04 19:32 UTC, emiddio
Details
soap config setup (240.43 KB, image/jpeg)
2014-03-04 19:33 UTC, emiddio
Details
default config step into (295.69 KB, image/jpeg)
2014-03-04 19:33 UTC, emiddio
Details
soap config step into (297.89 KB, image/jpeg)
2014-03-04 19:34 UTC, emiddio
Details
ant log (27.30 KB, text/plain)
2014-03-04 19:41 UTC, emiddio
Details
soap config ant log (27.31 KB, text/plain)
2014-03-04 19:43 UTC, emiddio
Details
default config ant log (27.30 KB, text/plain)
2014-03-04 19:43 UTC, emiddio
Details
Possible fix (1.23 KB, patch)
2014-03-05 14:52 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description emiddio 2014-02-28 20:42:27 UTC
i have javase project. i have default, and SOAP configurations.

with SOAP configuration it does not correctly use the java arguments field - uses the default, and also with SOAP config selected and select run project - it runs the default config - not the SOAP config - which is a different main class.
Comment 1 Jiri Prox 2014-03-03 14:56:20 UTC
Can you please provide project.properties file and content of 'configs' folder? (both located in nbproject folder in your project dir)
Comment 2 emiddio 2014-03-03 21:23:32 UTC
Created attachment 145726 [details]
project.properties
Comment 3 emiddio 2014-03-03 21:24:23 UTC
Created attachment 145727 [details]
configs/ file - SOAP.properties
Comment 4 emiddio 2014-03-03 21:31:01 UTC
I just reproduced again - easily.

create simple java j2se project.

configure a <default config> project config with main class A, and arguments A.

configure a second project config with main class B, and arguments B.

When you click on 'down arrow' / 'step into' / F7 with either config selected,
you always step-into the same class with same arguments.

It like it does not know there is more that 1 config.

There are 2 configs but only 1 config in the configs folder.

-Gary

Product Version: NetBeans IDE 8.0 RC1 (Build 201402242200)
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: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\gbello\AppData\Roaming\NetBeans\8.0rc1
Cache directory: C:\Users\gbello\AppData\Local\NetBeans\Cache\8.0rc1
Comment 5 Jiri Prox 2014-03-04 11:11:00 UTC
The described scenario works fine from me.

From the provided files I see that the main classes are in both case the same. 
The arguments are stored in private folder. Can you please attache it here?
Comment 6 Tomas Zezula 2014-03-04 13:40:24 UTC
I've tested the problem according to description and works fine for me.
Please can you attach Ant verbose output for both Step Ins.
Thanks a lot!
Comment 7 Tomas Zezula 2014-03-04 13:41:13 UTC
You can enable the Ant debug output in Tools/Options/Java/Ant/Verbosity Level.
Comment 8 emiddio 2014-03-04 19:31:16 UTC
i am attaching 5 files, a zip of the entire nbproject folder, and 4 JPG files showing the setup of of each of the configs and the result of debug step into invoked using each config.
Comment 9 emiddio 2014-03-04 19:32:02 UTC
Created attachment 145754 [details]
nbrpoject folder zip file
Comment 10 emiddio 2014-03-04 19:32:37 UTC
Created attachment 145755 [details]
default config setup
Comment 11 emiddio 2014-03-04 19:33:09 UTC
Created attachment 145756 [details]
soap config setup
Comment 12 emiddio 2014-03-04 19:33:34 UTC
Created attachment 145757 [details]
default config step into
Comment 13 emiddio 2014-03-04 19:34:08 UTC
Created attachment 145758 [details]
soap config step into
Comment 14 emiddio 2014-03-04 19:35:01 UTC
each config has a different main class - yet the same main class is invoked for both step into.
Comment 15 emiddio 2014-03-04 19:41:08 UTC
Created attachment 145759 [details]
ant log
Comment 16 emiddio 2014-03-04 19:43:13 UTC
Created attachment 145760 [details]
soap config ant log
Comment 17 emiddio 2014-03-04 19:43:35 UTC
Created attachment 145761 [details]
default config ant log
Comment 18 Tomas Zezula 2014-03-05 14:50:06 UTC
Caused by not save config.properties.
I think that the PP.cachedPropertiesFromFile has to be set to properties after save.
I am attaching patch but I am not sure how it affects new lines, so the original issue has to be tested with the patch. But I think it should be OK.
Comment 19 Tomas Zezula 2014-03-05 14:52:53 UTC
Created attachment 145781 [details]
Possible fix

Possible fix.
Comment 20 Marian Mirilovic 2014-03-05 14:53:35 UTC
Tomasi, it's too late for 8.0 . I propose to test a patch deeply and release as a part of patch release for 8.0 .
Comment 21 Tomas Zezula 2014-03-05 14:55:19 UTC
Mariane I've attached a possible fix.
The fix needs to be verified by Martin as I don't remember the original issue (som e new lines problem). If OK I believe it deserves to be a part of NB 8.0 as the problem is much bigger (random property files are not saved).
Comment 22 Martin Kozeny 2014-03-05 15:24:18 UTC
Tomasi your patch works fine for me.
Comment 23 Tomas Zezula 2014-03-05 15:27:06 UTC
So I vote for integrating it into release80.
Martine can you do it?
Or should I do it? I am on meeting just now.
I believe the patch is safe.
Comment 24 Milos Kleint 2014-03-05 18:04:44 UTC
the patch looks ok to me.
Comment 25 Tomas Zezula 2014-03-05 18:46:28 UTC
Fixed jet-main c89603e799ef
Comment 26 Tomas Zezula 2014-03-05 18:56:53 UTC
Transplanted into release80
http://hg.netbeans.org/releases/rev/b2429dbb1ff8
Comment 27 Quality Engineering 2014-03-06 01:11:48 UTC
Integrated into 'releases/release80', will be available in build *201403052200* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/b2429dbb1ff8
User: Tomas Zezula <tzezula@netbeans.org>
Log: #242468:javase project configurations not properly honored.
Comment 28 Quality Engineering 2014-03-12 02:47:35 UTC
Integrated into 'main-silver', will be available in build *201403120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c89603e799ef
User: Tomas Zezula <tzezula@netbeans.org>
Log: #242468:javase project configurations not properly honored.