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 61530 - Can no longer build with separate -Dnetbeans.dest.dir=...
Summary: Can no longer build with separate -Dnetbeans.dest.dir=...
Status: RESOLVED FIXED
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2005-07-29 05:01 UTC by Jesse Glick
Modified: 2005-09-05 10:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Suggested patch of ModuleListParser (2.27 KB, patch)
2005-08-11 16:06 UTC, Jiri Skrivanek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-07-29 05:01:48 UTC
Your patch to ModuleListParser seems to have broken the scenario of building to
a separate dest dir. If you run

ant -f nbbuild/build.xml -Dnetbeans.dest.dir=/somewhere/else build-platform

it breaks with a NPE, because scanStandaloneSource is being called from a
ModuleListParser constructor called from InsertModuleAllTargets, so
properties["project"] == null (which is fine).

Changing the if-clause to

if (scanNetBeansSources || properties.get("project") == null) ...

helps for a while, but it breaks later, because individual modules get scanned
using scanStandaloneSource later, and they are treated as standalone modules...
so Entry.jar is set to e.g.
openide/explorer/build/cluster/modules/org-openide-explorer.jar, which is nonsense.

Reverting your patches - most simply, setting scanNetBeansSources = true
unconditionally - makes the build work.

I would recommend the check for netbeans.dest.dir inside nb_all be removed, and
the default behavior be what it was originally. The test builder machine could
pass some special Ant property which would produce your behavior.
Comment 1 Jiri Skrivanek 2005-08-11 16:05:01 UTC
Well, it is not nice. Ideal would be to detect if netbeans.dest.dir contains
built IDE or not. But I think there is no such condition which can be checked.
I think we can use what Jesse suggested at the end - check whether xtest.home
property is set. If yes it is called from test (scan binaries), otherwise scan
sources.
Do you think it is acceptable?
Comment 2 Jiri Skrivanek 2005-08-11 16:06:10 UTC
Created attachment 23735 [details]
Suggested patch of ModuleListParser
Comment 3 Jesse Glick 2005-08-11 16:12:32 UTC
I think that makes sense.
Comment 4 Jiri Skrivanek 2005-08-12 08:31:21 UTC
Fixed as suggested.

/cvs/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java,v  <-- 
ModuleListParser.java
new revision: 1.21; previous revision: 1.20