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 125602 - Don't hardcode dist directory in build harness
Summary: Don't hardcode dist directory in build harness
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-18 22:39 UTC by tomwheeler
Modified: 2008-02-27 04:05 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch to apisupport module (17.30 KB, patch)
2008-01-18 22:42 UTC, tomwheeler
Details | Diff
Patch to nbbuild module (5.15 KB, text/plain)
2008-01-18 22:43 UTC, tomwheeler
Details
patch to allow overriding 'dist' directory name (8.13 KB, patch)
2008-02-24 02:08 UTC, tomwheeler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tomwheeler 2008-01-18 22:39:11 UTC
The build harness currently hardcodes the "build" and "dist" directories throughout the build files.  This makes it
impossible to override these values. It would be better if they were properties with sensible default values.
Comment 1 tomwheeler 2008-01-18 22:41:13 UTC
I have made a preliminary pass at changing this and will attach a patch.  I have not tested it yet and I don't expect it
will work without additional effort. I've also specified the default values for build.dir and dist.dir in each file,
which is excessive.  I am attaching them here so I will have them when I get more time.
Comment 2 tomwheeler 2008-01-18 22:42:45 UTC
Created attachment 55266 [details]
Patch to apisupport module
Comment 3 tomwheeler 2008-01-18 22:43:21 UTC
Created attachment 55267 [details]
Patch to nbbuild module
Comment 4 Jesse Glick 2008-01-24 23:54:28 UTC
Too busy to really look at this now, but ping me later in the 6.1 dev cycle (_before_ feature freeze).
Comment 5 tomwheeler 2008-01-25 15:38:19 UTC
Will do.  The attached patch is currently just a quick stab at it; it needs some work.  I am going to do some testing, 
fix as needed and create a new patch against the Hg repo after the switchover.  
Comment 6 Jesse Glick 2008-02-20 23:22:35 UTC
Are you still working on this?
Comment 7 tomwheeler 2008-02-22 15:45:49 UTC
Still planning too, just trying to meet a deadline for something at work, so not much free time at the moment.  Do you 
know what I can consider a deadline for resubmitting a working/tested patch that could still make it into 6.1?
Comment 8 Jesse Glick 2008-02-22 17:06:37 UTC
http://wiki.netbeans.org/NB61Milestones

but the sooner the better.
Comment 9 Lukas Hasik 2008-02-22 18:11:06 UTC
Tom, the most important date for you is - Feb 25 - NB 6.1 *Feature Freeze*. After 2/25 the development will focus on bug
fixing... 
Comment 10 tomwheeler 2008-02-22 19:40:13 UTC
Thanks Jesse/Lukas -- I will make a point of working on this over the weekend.
Comment 11 tomwheeler 2008-02-23 05:17:15 UTC
I've been working all night at getting a copy of NetBeans sources checked out from Mercurial so I can do this patch, but
I  am still not able to build due to missing/corrupted external libraries.   I'll ask for help on that problem on the
dev@openide list, but at this point, it seems unlikely that I will be able to complete this by Monday in time for 6.1 as
I  had hoped.  I do plan on completing the issue anyway, and hope you will accept my apologies for not getting it done
sooner.
Comment 12 Jesse Glick 2008-02-23 16:43:46 UTC
A patch against 6.0 would probably apply with a little work, or you can just download a source ZIP (I think - never tried).
Comment 13 tomwheeler 2008-02-23 19:43:38 UTC
Thanks to Jesse's advice on the nbdev list, I am now able to check out a copy of trunk sources from hg.  I am going to
try to get this done today after all.
Comment 14 tomwheeler 2008-02-24 02:08:40 UTC
Created attachment 57147 [details]
patch to allow overriding 'dist' directory name
Comment 15 tomwheeler 2008-02-24 02:16:20 UTC
My patch is attached -- in the end I was only able to allow overrides of the "dist" directory.  The patch is pretty
simple and I am pretty confident in the testing I have done.  I will note that I was not able to test the JNLP support;
it failed with the same error about $$codebase being invalid whether or not the patch was applied.  I have never really
used JNLP on this machine and am not sure what the story is with that, but it does not seem to have anything to do with
the patch.

Doing the same for the build directory name turns out to be far more complex than I had thought, since there are both
module build directories and suite build directories and there's no properties file that is consistently imported in all
the places where "build" is hardcoded.  For the record, I was able to get things to *mostly* work, but I had some
trouble with how testuserdir is set in run.xml dependending on whether the build was launched from a module or from the
suite.  I did not feel confident enough that I could get this fixed and test all the permuations needed for a milestone
release.  Thus I have renamed this issue to reflect that it only covers the "dist" directory and I will address the
"build" directory in another issue sometime later.

Comment 16 Jesse Glick 2008-02-24 18:50:02 UTC
Committed as #094495778bc9 with changes:

1. Noted in README.

2. Updated suite project type to use ${dist.dir} in sharability query, so a different value will be properly considered
ignorable by a VCS. (Tested with dist.dir=dist2 and a local SVN repo on PaintApp.)
Comment 17 tomwheeler 2008-02-25 01:23:59 UTC
Thanks so much for all your help!
Comment 18 Jesse Glick 2008-02-25 18:25:10 UTC
You may want to fetch the revision in question, build, and mark VERIFIED if it in fact does what you expect.
Comment 19 tomwheeler 2008-02-27 04:05:47 UTC
Verified against Hg trunk sources as of Tue Feb 26 22:05:10 CST 2008.