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.
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)
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.
Bug is easy reproducible with PMD.nbm. The error messgae should be fixed in 3.6.
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.
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"'/>
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).
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.
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
contrib/pmd-nb-wrapper *is* already in nbbuild/build.properties, so it should automatically be included in daily dev alpha AU builds.
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.
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.
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.
Well it's not fixed *yet*.
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).
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?
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
NetBeans buildtools have been updated long time ago.
So what *is* the current contract for the 'nbm' target?
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.
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.