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 158234 - A subproject which is referenced by a project is incorrectly using the parent projects build properties
Summary: A subproject which is referenced by a project is incorrectly using the parent...
Status: NEW
Alias: None
Product: soa
Classification: Unclassified
Component: Composite Application (show other bugs)
Version: 6.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@soa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-09 21:28 UTC by jasonray76
Modified: 2009-03-06 12:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample to reproduce (73.10 KB, application/x-compressed)
2009-02-10 19:18 UTC, jasonray76
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jasonray76 2009-02-09 21:28:30 UTC
When you have one NetBeans project that references a second NetBeans project, the target in build-impl.xml which does
the builds/clean calls to the sub project place the directory of the subproject into the antfile attribute of the <ant>
tag.  This results in the sub project using the parents project for its build properties and errors out.   The fix to
this is to use the "dir" attribute to hold the directory path and the antfile attribute to only contain the name of the
project file.   This must be done for every ant call.
Comment 1 jasonray76 2009-02-10 19:13:36 UTC
Sean,

I tried implementing the changes described by the blog's author, but I am still seeing the basedir problem that I
described to your group in our last meeting.

The attached zip file, ant_build.zip contains:

Build_test.xml
Build.win.properties
Output.txt
NHINCA
NHINBPEL

Please copy to c:\temp and unzip. You may have to modify build.win.properties and change the values of
caps.netbeans.home and glassfish.home to match your environment. 

NHINCA is a Composite Application that references NHINBPEL. Build_test.xml is a simple ant script that calls into
NHINCA. NHINCA then calls into NHINBPEL. Output.txt is the output from my ant call. Build.win.properties is the property
file that is specified within the blog post. One note: I could not load the property file using the -propertyfile
attribute on the initial ant call, I needed to load as a property file from within the ant script. 

There are NO overrides in NHINCA's build.xml file. NHINBPEL's build.xml overrides the -pre-init task, and echo's the
basedir. The expected value would be c:\temp\nhinbpel. However, as you can see from output.txt, the actual value is
c:\temp\NHINCA. This is the basedir of the parent project which is incorrect. If you override all targets in NHINCA's
build.xml file that contain an <ant task and include the dir attribute, and re-run, the basedir that is echoed is
"c:\temp\nhinbpel". 

To execute the scripts, I opened a command prompt and navigated to c:\temp and issued the following command:
ant -f build_test.xml
 
All of the environment variables specified by the blog's author were set prior to calling the command. 

I will continue to investigate the basedir problem, but I am not very hopeful. On a slightly positive note, the solution
in the blog allows us to bypass our overrides of -init-caps in the build.xml of the projects. However, the override of
the ant calls is far more vexing. 

Please feel free to contact me if there are any questions regarding the attached projects or scripts. 

Thanks,

Kieran. 



-----Original Message-----
From: Sean.Keane@Sun.COM [mailto:Sean.Keane@Sun.COM]
Sent: Thursday, February 05, 2009 5:11 PM
To: Kieran Dunne
Subject: Re: build script issue

Kieran,

When you get a chance, please review this blog entry - http://blogs.sun.com/tronds/entry/creating_a_simple_headless_build

Does any of this info help?

Sean
Comment 2 jasonray76 2009-02-10 19:18:36 UTC
Created attachment 76816 [details]
Sample to reproduce
Comment 3 Vladimir Yaroslavskiy 2009-03-06 12:34:10 UTC
The issue belongs to the root project - comp app.