Re: Packaging Netbeans on Gentoo

Emilian Bold <[email protected]> Sat, 25 Nov 2017 02:11:35 +0200
Newsgroups gmane.comp.java.netbeans.devel
Message-ID <CAL6R17CszJy=nCyVe_fxm=eUtwCcuq=p_U=ZDJeVEVnFhEu-tg@mail.gmail.com>
Nice email. I might have missed some info so feel free to remind me.

Clusters are just a folder or a meta-package skeleton and they exist
specifically for packaging on *nix. See
http://wiki.netbeans.org/DevFaqWhatIsACluster

I personally don't find clusters as valuable and if you have only
NetBeans (and not other NetBeans-based app) having all the JARs in a
single 'pool' / folder would look just as well to me.

TopLogging has these lines

        String buildNumber = System.getProperty
("netbeans.buildnumber"); // NOI18N
        String currentVersion = NbBundle.getMessage(TopLogging.class,
"currentVersion", buildNumber );

where it calls NbBundle expecting to find the `currentVersion` key in
./core.startup/src/org/netbeans/core/startup/Bundle.properties

Using java-pkg-simple instead of ant might be a struggle particularly
since java-pkg-simple mentions there is no support for generating
source files and such. Many NetBeans annotations generate code at
compile time (in META-INF for services, layer file or in the same
package as Bundle.java for l10n).

I sure hope these files are autogenerated from the project.xml files:
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/dev-java/netbeans-options-api/netbeans-options-api-9999.ebuild

PS: Please use the [email protected] mailing list,
this one is closing soon.

--emi


On Fri, Nov 24, 2017 at 10:40 PM, William L. Thomson Jr.
<[email protected]> wrote:
> Greetings fellow Netbeaners!
> I have been a long time Netbeaner, going back so many years I cannot
> recall when I first used Netbeans. I recall talking to a Netbeans
> developer at Linux World Expo I think in 2002 or 2003, so at least back
> to then. It is my primary IDE for everything, but maybe Android stuff.
> Mostly Java and C, with other stuff. I do like the syntax support for
> cmake. Maybe need to see about that for Gentoo ebuids, and also meson.
>
> Netbeans 8.2 is packaged on Gentoo using Netbeans ant build system.
> That is fine, and has no issues under 1.8. Of course under 9 things
> change. Also Gentoo being from source, it was difficult to get every
> bit of Netbeans from source. Many aspects used pre-built shipped binary
> jars. Which some of them may already be installed on the system in
> newer versions. Some shipped were able to be swapped out with system,
> but the entire thing is cumbersome. Not to mention its split up, but
> not exactly modular. It is difficult to work with for my needs.
> https://github.com/gentoo/gentoo/tree/master/dev-java
>
> Having been building a bunch of stuff from source not using ant. Using
> Gentoo eclasses, java-pkg-simple. Which basically uses the find command
> to find all source files. Then passes those to javac, and we tar it up
> with jar. Basically a shell script to the extreme with python wrapper,
> portage/emerge.
>
> Having packaged other things, jetty, large portions of eclipse and
> numerous other things. I figured I would try out Netbeans. It makes
> sense given my dependence. So that is underway. I have some 50+
> packaged and many more to go. I do not think I will do all modules. Not
> sure about that when it exists on the system.
> https://github.com/Obsidian-StudiosInc/os-xtoo/tree/master/dev-java
>
> Tons of work to do, lots to package, etc. But I think the outcome
> should be nice. Possibly a slimmed down, optional Netbeans like exists
> on no other platform. Making some progress and I think close to an
> initial IDE starting. Though I know a lot of stuff will be missing
> till packaged etc. Still have to figure out the clusters aspect.
>
> Initial work on a Netbeans eclass ,to do some of the stuff that ant was
> doing during build. Processing bundles, adding resources, etc.
> https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/eclass/java-netbeans.eclass
>
> Getting close to starting something, but ran into my first startup
> error. Pretty sure missing a jar, or something inside a jar. I have a
> working 8.2 I may swap out some jars so I can see what I missed. If
> anyone has any pointers much appreciated.
>
> I know I will be encoutering lots of odd issues. I know what I am doing
> is highly abnormal. Please bear with me. I will look to address any
> issues I create. Just may need some pointers on some issues like the
> following exception. I was trying to get an idea via the following link.
>
> http://bits.netbeans.org/8.2/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html
>
> Any links or information will be greatly appreciated! Thanks for the
> great IDE!
>
>
> Startup exception, seems I am missing a bundle resource, or something I
> haven't packaged yet. Seems like this should be in core.startup, which
> I have packaged. Maybe failed on something there.
>
>
> $ netbeans-9
> java.util.MissingResourceException: Can't find resource for bundle
> org.openide.util.NbBundle$PBundle, key currentVersion at
> java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:544)
> at
> java.base/java.util.ResourceBundle.getString(ResourceBundle.java:501)
> at org.openide.util.NbBundle.getMessage(NbBundle.java:617) at
> org.openide.util.NbBundle.getMessage(NbBundle.java:711) at
> org.openide.util.NbBundle.getMessage(NbBundle.java:633) at
> org.netbeans.core.startup.TopLogging.printSystemInfo(TopLogging.java:221)
> at org.netbeans.core.startup.TopLogging.initialize(TopLogging.java:178)
> at org.netbeans.core.startup.TopLogging.initialize(TopLogging.java:140)
> at org.netbeans.core.startup.CLIOptions.initialize(CLIOptions.java:227)
> at org.netbeans.core.startup.Main.start(Main.java:216) at
> org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98) at
> java.base/java.lang.Thread.run(Thread.java:844)
>
>
>
> --
> William L. Thomson Jr.