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 26722 - IllegalStateException in MakeListOfNBM when creating nbm file.
Summary: IllegalStateException in MakeListOfNBM when creating nbm file.
Status: RESOLVED WONTFIX
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Michal Zlamal
URL:
Keywords:
: 26808 (view as bug list)
Depends on:
Blocks: 26716 26730
  Show dependency tree
 
Reported: 2002-08-22 19:55 UTC by George Hernandez
Modified: 2007-09-25 14:14 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
patch to fix main directory problem (536 bytes, patch)
2002-08-27 22:14 UTC, George Hernandez
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description George Hernandez 2002-08-22 19:55:59 UTC
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.
Comment 1 Michal Zlamal 2002-08-22 20:48:41 UTC
The <makenbm> task is designed to not include other files than in 
netbeans directory.
Comment 2 George Hernandez 2002-08-22 21:00:32 UTC
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".
Comment 3 George Hernandez 2002-08-22 23:52:33 UTC
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.
Comment 4 Jesse Glick 2002-08-23 00:50:04 UTC
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
Comment 5 akemr 2002-08-23 09:47:52 UTC
Postinstallers are supported but not documented :-(
I created task about it: #26730
Comment 6 George Hernandez 2002-08-23 17:48:23 UTC
Jesse, Thanks for the info. I'll explore removing the domake script,
which is probably what I should have done to begin with.
Comment 7 Jesse Glick 2002-08-27 17:26:20 UTC
*** Issue 26808 has been marked as a duplicate of this issue. ***
Comment 8 rbalada 2002-08-27 17:41:42 UTC
Reassigning to George.
Comment 9 George Hernandez 2002-08-27 22:14:51 UTC
Created attachment 7226 [details]
patch to fix main directory problem
Comment 10 George Hernandez 2002-08-27 22:18:22 UTC
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.
Comment 11 Michal Zlamal 2007-09-25 14:14:43 UTC
AFAIK this is obsolete