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.
I get the following exception while trying to create an nbm file in the cpp module. netbeans: [genlist] Generating information for Auto Update... BUILD FAILED java.lang.IllegalStateException: /export/home/cvs/trunk/nb_all/cpp/main/CPPPostInstall.java at org.netbeans.nbbuild.MakeListOfNBM.execute(MakeListOfNBM.java:105) at org.apache.tools.ant.Task.perform(Task.java:217) at org.apache.tools.ant.Target.execute(Target.java:184) at org.apache.tools.ant.Target.performTasks(Target.java:202) at org.apache.tools.ant.Project.executeTarget(Project.java:601) at org.apache.tools.ant.Project.executeTargets(Project.java:560) at org.apache.tools.ant.Main.runBuild(Main.java:454) at org.apache.tools.ant.Main.start(Main.java:153) at org.apache.tools.ant.Main.main(Main.java:176) Total time: 3 seconds This is caused by some extra files I am putting in the cpp.nbm file. I have created a main directory at the top level for the module. The main directory contains a class (CPPPostInstall) that is to be executed once the autoupdate module finishes installing the cpp module. This class will change the permissions of a script that is installed in the netbeans bin directory. The MakeListOfNBM class does not take the files in the main directory into account and it dies when comparing the path names. It compares .../cpp/netbeans to .../cpp/main and throws the exception. I've gotten around this in the cpp module by changing my build script to do the genlist before creating the main directory. But, I still have to remove the main directory before I can rebuild the module.
The <makenbm> task is designed to not include other files than in netbeans directory.
I don't understand why MakeListOfNBM throws an exception for my directory "main" but not for "mainsrc". Currently, with the cpp module, if I don't do a "clean" that removes the main directory, I get the exception. In order to test this, try building the cpp module a second time without doing a "clean".
I missread your previous statement. I read <makenbm> and was thinking MakeListOfNBM. But I disagree. There is a facility for executing a class after the autoupdate module has installed all the files into the netbeans directory. My understanding is that the class needs to be in a directory called main at the top level. This class in the cpp module is called CPPPostInstall. It will change the permissions of the file bin/domake.sh after autoupdate installs the file.
I think I see now. <makenbm ...> <!-- ... --> <include name="main/"/> </makenbm> is incorrect; you are saying to include nothing in the NBM besides cpp/netbeans/main/. What you want is for the task to support including post-installers, which it currently doesn't AFAIK. Maybe try <include name="netbeans/"/> too, or fool with isstandardinclude="true"/"false". This may be an RFE if there is no way to add installers with the current task impl. By the way, my guess is that domake.sh is really useless and Runtime.exec as of JDK 1.3 if not earlier would suffice. In which case there would be no need to bundle this file, and no need to chmod a+x it. And issue #24357 would eliminate the need for a post-installer for you, too. BTW Ales - are postinstallers even supported or documented at all?! I see no mention of them in http://autoupdate.netbeans.org/nbm/nbm_package.html
Postinstallers are supported but not documented :-( I created task about it: #26730
Jesse, Thanks for the info. I'll explore removing the domake script, which is probably what I should have done to begin with.
*** Issue 26808 has been marked as a duplicate of this issue. ***
Reassigning to George.
Created attachment 7226 [details] patch to fix main directory problem
Issue 26730 will document the feature in autoupdate which allows a main directory in the nbm file. I am changing the component back to nbbuild and I'm including a patch which will fix the problem, assuming that the "main" directory files should be treated like the "Info" directory files.
AFAIK this is obsolete