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 104864 - Cannot develop against a platform at relative path
Summary: Cannot develop against a platform at relative path
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 62765
  Show dependency tree
 
Reported: 2007-05-25 17:25 UTC by tomwheeler
Modified: 2007-06-25 23:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Extremely basic suite project to illustrate the bug (331.65 KB, application/octet-stream)
2007-05-25 17:27 UTC, tomwheeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomwheeler 2007-05-25 17:25:24 UTC
I am working on a platform application and must build against an
custom platform image checked out from CVS to a specific location relative to
the suite.  I have read the README document in the harness and it says to set
the following values (which I did):

   suite.dir=${basedir}
   netbeans.dest.dir=${suite.dir}/../system/platform
   harness.dir=${netbeans.dest.dir}/harness

The values are all correct and I can initially build from the command line using
Ant with no trouble.  However, after opening the project with the 6.0 IDE
(reproducible in at least M7 and M8), these settings are ignored and the IDE
tries to build against itself instead, as described below.

If I look at the properties of a module within my suite and click the
Libraries tab, I get a dialog warning which says, "Previously set
platform not found; switching to default".  The platform it says it's building
against is then not the one at the netbeans.dest.dir path, but is instead the
current IDE.  Consequently, I can not add dependencies correctly because the IDE
does not see any of the modules in my custom platform, only those in the IDE.  

The only workaround is to use the NetBeans platform manager to set up the
platform binary at netbeans.dest.dir, but this introduces hardcoded paths and
adds the nbplatform.active property to platform.properties, which the README
says explicitly *not* to include.

We need to do automated builds from the command line as well as interactive ones
from the IDE, and both need to be done against a known platform instead of
against whatever IDE the developer happens to be using.  This bug prevents us
from doing that.
Comment 1 tomwheeler 2007-05-25 17:27:17 UTC
Created attachment 42800 [details]
Extremely basic suite project to illustrate the bug
Comment 2 tomwheeler 2007-05-25 17:31:28 UTC
To reproduce:

1. Unpack the attached ZIP file to some directory on the development machine.  

2. Place a custom platform at a directory 'netbeans' parallel to the
relpathtestsuite (thus matching the netbeans.dest.dir property in
platform.properties)

3. Open the suite in the NetBeans 6.0 IDE

4. Right-click the 'relpathtestmodule' and choose 'Properties'.  Try to add a
dependency on some module within your custom platform that does not exist in the
IDE.
Comment 3 Jesse Glick 2007-06-25 23:23:23 UTC
Checking in src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModuleProperties.java;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModuleProperties.java,v
 <--  SingleModuleProperties.java
new revision: 1.69; previous revision: 1.68
done
Checking in test/unit/src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModulePropertiesTest.java;
/shared/data/ccvs/repository/apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/ui/customizer/SingleModulePropertiesTest.java,v
 <--  SingleModulePropertiesTest.java
new revision: 1.45; previous revision: 1.44
done
Comment 4 Jesse Glick 2007-06-25 23:27:02 UTC
Bad code introduced long ago in issue #62765. Not sure how it could ever have worked.