Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 143236 - Support "orphaned" modules
Support "orphaned" modules
Product: apisupport
Classification: Unclassified
Component: Project
All All
: P1 (vote)
: 6.x
Assigned To: Jesse Glick
Depends on: 144863
  Show dependency treegraph
Reported: 2008-08-07 22:34 UTC by Jesse Glick
Modified: 2008-11-13 05:07 UTC (History)
2 users (show)

See Also:

Initial patch for apisupport.project which lets you open orphaned projects (9.61 KB, patch)
2008-08-08 00:25 UTC, Jesse Glick
Details | Diff
Updated patch (19.49 KB, patch)
2008-08-08 22:39 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-08-07 22:34:15 UTC
There have been requests to permit users to open and build selected modules without having the complete
source tree available.
Comment 1 Jesse Glick 2008-08-08 00:25:33 UTC
Created attachment 66879 [details]
Initial patch for apisupport.project which lets you open orphaned projects
Comment 2 Jesse Glick 2008-08-08 22:39:01 UTC
Created attachment 66940 [details]
Updated patch
Comment 3 Jesse Glick 2008-08-08 23:00:51 UTC
I think I have this working. I don't want to push an implementation today because I am not confident there is no
potential for regressions (some subtle code in the build system had to be patched) and I will be on vacation next week.
Michal if you have a moment to review the patch, that would be great.

Quick usage guide:

1. Create an nb_all dir wherever you like. It must have at least the nbbuild dir from the source tree (with
the patches in this issue applied).

2. Create nbbuild/ and in it set the property 'netbeans.dest.dir' to the full path to a NetBeans
IDE installation you would like to both compile against and build into (you should not use your real development IDE,
rather a copy).

3. Run: ant -f nbbuild/build.xml bootstrap

4. Add subdirs for any module projects you would like to work on. (The modules may be already present in
the target platform. If they are not, you need to check out sources for any transitive dependencies not in the target
platform too.)

5. Using an IDE whose apisupport.project has also been patched as in this issue, open the desired projects and work

What works:

1. Source projects should open without error and without displaying error badges, assuming all dependencies are
available in either source or binary form.

2. You can build the projects normally. The modules will be built into the target platform (overwriting any existing
copy of the module).

3. You can use Run and Debug to start the target platform with a test userdir after building the modules, set
breakpoints etc.

4. You can Test the source projects normally.

5. Code completion should work against APIs present in other modules. If those modules are available in source form, you
will get popup Javadoc automatically, and can navigate to sources. If not, you can still add popup Javadoc capability
for all published APIs:

a. Download "NetBeans API Documentation" from AU.
b. Open NetBeans Platform Manager.
c. Select the "default" platform and note the location of in the Javadoc tab.
d. Create a new platform; select the same dir as you specified for netbeans.dest.dir.
e. In the new platform, add to the Javadoc tab.


1. If you want to work on unit or functional tests, you need to have all test-to-test dependencies available as source
projects, because we do not distribute test libraries. Sometimes the transitive dependency tree can get a bit big. For
example, if the functional tests use org.netbeans.junit.ide.ProjectSupport, then you need to check out java.j2seproject
(in whose unit test dir this class resides), then its dependencies in turn: projectapi, projectui, openide.filesystems,
and openide.util. Test-to-module dependencies (e.g. nbjunit, jellytools, ...) can however be satisfied from the target
platform's binaries.

2. If you add new source modules to the tree, you will need to both restart NetBeans and delete the
nbbuild/nbproject/private/ dir in order to reset all caches and ensure that the new sources are recognized.

3. Various targets in nbbuild/build.xml not used in the above scenarios may or may not work usefully, though this should
not affect routine module development.

4. The target platform needs to be new enough to support any API calls you are making from source modules into binary
modules. If the platform is older, you could see error badges. Besides getting a newer platform, this can be corrected
by adding sources of the new version of the API module to the tree.
Comment 4 Jesse Glick 2008-08-21 18:07:33 UTC
I wrote up a wiki page documenting the feature.

Implementing: core-main #8647aaf569db
Comment 5 Quality Engineering 2008-08-22 17:17:10 UTC
Integrated into 'main-golden', available in build *200808221401* on
User: Jesse Glick <>
Log: #143236: support orphaned modules.
Comment 6 Quality Engineering 2008-11-13 05:07:22 UTC
Integrated into 'main-golden', will be available in build *200811130201* on (upload may still be in progress)
User: Jesse Glick <>
Log: #143236 clean-up; test was failing.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo