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 39201 - Update NetBeans buildtools to take nbms built into one directory
Summary: Update NetBeans buildtools to take nbms built into one directory
Status: RESOLVED FIXED
Alias: None
Product: updatecenters
Classification: Unclassified
Component: AU Masters (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: rbalada
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-25 10:15 UTC by msayag
Modified: 2004-12-10 22:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description msayag 2004-01-25 10:15:29 UTC
When trying to install PMD the following exception
is thrown:

Annotation: Exception occurred in Request Processor
java.lang.NullPointerException
	at
org.netbeans.modules.autoupdate.Downloader.download(Downloader.java:168)
	at
org.netbeans.modules.autoupdate.Downloader.downloadAll(Downloader.java:138)
	at
org.netbeans.modules.autoupdate.Downloader.access$300(Downloader.java:31)
	at
org.netbeans.modules.autoupdate.Downloader$1.run(Downloader.java:76)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:680)
Comment 1 bondolo 2004-01-26 18:19:12 UTC
It seems that the file is missing from the update site and that the
auto update UI is failing poorly in response to the missing file. So
there are actually 2 problems;

1. PMD module is missing from web site
2. Autoupdate UI fails badly when files are missing.
Comment 2 Jiri Rechtacek 2004-01-30 16:23:08 UTC
Bug is easy reproducible with PMD.nbm. The error messgae should be
fixed in 3.6.
Comment 3 Jiri Rechtacek 2004-01-30 17:11:02 UTC
Downloader catches NPE and notify user. It the max what can autoupdate
do. Reassigned to PMD module to fix the incompleted attributes in
module info, at least an "distribution" attribute is missing.
Comment 4 _ pkuzel 2004-02-03 13:20:40 UTC
Suspicious line from contrib/pmd-nb-wrapper/build.xml:

<replace file="tmp/info-subst.xml" token='codenamebase="pmd"'
value='codenamebase="pmd" distribution="${dist.base.fixed}/pmd.nbm"'/>
Comment 5 _ pkuzel 2004-02-03 13:25:07 UTC
pmd-nb-wrapper/build.xml:
revision 1.4
date: 2003/12/12 23:58:07;  author: jglick;  state: Exp;  lines: +7 -6
#37957: daily alpha AU publishing process chokes on modules that build
multiple files named *.nbm. It thinks they are all outputs regardless
of where they live. Workaround to rename intermediate files.

I recently used workaround with multiple subdirs and build.xml
(suggestions, suggestions/ui).
Comment 6 Jesse Glick 2004-02-03 17:16:06 UTC
Indeed www/www/updates/alpha/dev_1.6_.xml shows

<module codenamebase="pmd"
        homepage="http://pmd.sourceforge.net/"
        license="LICENSE.txt"
        downloadsize="719343"
        needsrestart="false"
>

which is wrong.

When I try

$ cd contrib/pmd-nb-wrapper
$ ant clean nbm

then pmd.nbm!/Info/info.xml contains

<module codenamebase="pmd"
distribution="http://www.netbeans.org/download/nbms/40/pmd.nbm"
        homepage="http://pmd.sourceforge.net/"
        license="LICENSE.txt"
        downloadsize="0"
        needsrestart="false"
>

which I suppose is right.

So something is wrong in AU publishing process.
Comment 7 rbalada 2004-02-04 12:37:02 UTC
Jesse,

we currently don't have a valid copy of pmd.nbm (it's not part of
daily build). I will remove the current copy of pmd.nbm from local
cache and will rebuild dev Alpha Update Center content.

If you want the pmd.nbm reappear on dev Alpha UC you can choose one of
these solutions:

1) send "developer verified" version of pmd.nbm
   to aumasters@netbeans.org with request to publish it on dev Alpha
   UC and we will put it into the local cache and make it live

or

2) put respective module, which produces pmd.nbm, into
   daily-alpha-nbms module config in nbbuild/build.properties

Comment 8 Jesse Glick 2004-02-04 16:06:53 UTC
contrib/pmd-nb-wrapper *is* already in nbbuild/build.properties, so it
should automatically be included in daily dev alpha AU builds.
Comment 9 rbalada 2004-02-04 20:07:09 UTC
Now I recall, it's this hidden change to make all the nbms into one
directory.

I have to update NetBeans buildtools to stop parsing build log and
accept built NBMs from the nbbuild/nbms directory.
Comment 10 Jesse Glick 2004-02-04 20:39:12 UTC
I did *try* to put in some hack into the build script (a few weeks ago
I guess?) to have it report only the proper NBM. But without access to
your log parsing script (or some exact description of what it does) I
can't really test it.
Comment 11 rbalada 2004-02-04 21:07:03 UTC
I tried quick hack to disable buildlog parsing in alpha NBMs build
(need to do it also in further NBMs builds) and set the nbm.target.dir
property to certaing directory which will then be used for packaging.

Today's daily build should get this change, so perhaps tomorrow
morning pmd.nbm will be back online an correct.
Comment 12 Jesse Glick 2004-02-04 22:51:05 UTC
Well it's not fixed *yet*.
Comment 13 Jesse Glick 2004-02-04 22:56:20 UTC
I patched contrib/pmd-nb-wrapper/build.xml to specially pay attention
to the ${nbm.target.dir} property if it is set. Maybe that will work.
<makenbm> interprets this property automagically, but
contrib/pmd-nb-wrapper does not use the <makenbm> task (it just
repackages an existing NBM).

(I consider the magic property a temporary hack that we should not
rely on indefinitely; the behavior of Ant tasks ought not change
dramatically based on an undocumented property that does not appear
textually in the average script. Much better to decide on a standard
property to represent the target dir, and make sure build scripts send
their output there. I have some other complaints about the hacks in
<makenbm> but now is not the time.)

BTW msayag, bondolo: the PMD NBM is available also from pmd.sf.net; it
is just offered on nb.org's AU for convenience (since other modules
directly depend on it).
Comment 14 rbalada 2004-02-04 23:17:34 UTC
Jesse,

now I'm confused. I checked 200402021900 Alpha NBMs build log and
found no reference to pmd.nbm. How could my scripts know where it is,
when it's neither built into directory specified in nbm.target.dir nor
referenced in build log?
Comment 15 Jesse Glick 2004-02-04 23:33:22 UTC
Well I don't know how your script is supposed to know anything -
that's why someone (you) needs to define some kind of reasonable
contract for where an NBM should be placed when you call the 'nbm'
target in a module's build script. For the 'netbeans' target, the
contract is that ${basedir}/netbeans/ will be merged into the product.

There is not yet any corresponding contract for the 'nbm' target. It
just happens to work for most modules because they don't deal with
more than one file named "*.nbm", and then fails for this one. My
previous patch to contrib/pmd-nb-wrapper/build.xml was an attempt to
mangle the filenames used internally in the 'nbm' target so that only
the final file actually had the '.nbm' extension; the intermediate
files have some bogus names so as to not to trigger the log grepping
in your script. Apparently this didn't work, for whatever reason.

Certainly the change you mentioned:

"Every module build script should have a target named 'nbm' which may
create an NBM file (of any name but with '.nbm' extension?) in the
directory given by the Ant property 'nbm.target.dir'."

would be an improvement, if properly documented at

  http://nbbuild.netbeans.org/ant-extending.html#nbm
Comment 16 rbalada 2004-12-07 15:40:38 UTC
NetBeans buildtools have been updated long time ago.
Comment 17 Jesse Glick 2004-12-08 01:12:18 UTC
So what *is* the current contract for the 'nbm' target?
Comment 18 rbalada 2004-12-08 06:29:23 UTC
NetBeans buildtools do remove nb_all/nbbuild/nbms directory, calls ant
build-nbms target from nb_all/nbbuild/build.xml and then packs content
of nb_all/nbbuild/nbms directory.
Comment 19 Jesse Glick 2004-12-10 22:26:37 UTC
I'm asking specifically how the build infrastructure specifies where
the generated NBMs are supposed to be generated. That is the contract
I am asking about, which AFAIK is not documented anywhere.