Packaging Netbeans on Gentoo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Packaging Netbeans on Gentoo

William L. Thomson Jr.
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.

attachment0 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

Stanislav Baiduzhyi
William,

It seems like you are trying to do it the hard way. I tried something similar too, but it seemed to be too complicated with very little actual benefit, so I did it the easy way:

Breaking the cluster is mostly replicated from actual NetBeans packages.


On Fri, Nov 24, 2017 at 9:41 PM William L. Thomson Jr. <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

William L. Thomson Jr.
On Fri, 24 Nov 2017 21:46:27 +0000
Stanislav Baiduzhyi <[hidden email]> wrote:

> William,
>
> It seems like you are trying to do it the hard way.

Gentoo does everything the hard way. But they say the best things in
life do not come easily.  Either way I like the hard way :P

Actually not really that hard to me. I found working with ant and the
way the current 8.2 is packaged to be much harder. Took way more time
and made less progress. Keep in mind I package lots of stuff this way,
eclipse, jetty, jersey, netty, etc.

Its become routine for me, trivial for the most part. Aside from
replicating how things were originally. Though that is not really the
goal. Modularity and only having what you need is the goal.

> I tried something similar too, but it seemed to be too complicated
> with very little actual benefit, so I did it the easy way:
> https://build.opensuse.org/package/view_file/home:tuxjdk/netbeans/netbeans.spec?expand=1

Thanks I will review and cherry pick if i can.

Keep in mind I am not building it once and shipping binaries. Gentoo is
a from source distro. All packages build from source. I need to have
means to build it all the time. Not to mention reducing dependencies to
an absolute minimum.

That was the idea when splitting it up on Gentoo. It used to be 1
netbeans package, vs several. It has some ENV vars to control pieces.
But I do not believe it was every fully worked out. Such that you did
not need all enabled but could have pieces.

NETBEANS_MODULES="apisupport groovy gsf harness ide java javafx j2ee nb
webcommon websvccommon visualweb"

You will see each of those packages on gentoo, netbeans-apisupport,
netbeans-groovy, etc. But pretty sure you still need all, cannot have
just say java, javafx, j2ee, and nb. What if I do not want groovy, as
an example.

When I am doing it will be like USE flags. You will enable Netbeans
modules/clusters via USE flag. The USE flag set will bring in other
pieces to build of Netbeans. Without you get a slimmed down minimal UI.
I doubt this has been attempted before, at least not shipping binaries
as the result. This way each user may have a bit different Netbeans
based on their needs.

> Breaking the cluster is mostly replicated from actual NetBeans
> packages.

A past dev managed to pull off how it was now in Gentoo. But there was
a lot more work needed to fully refine. I am going a different
direction and feel it will be a better one. I think time was it is a
trade off and wash.

Thus far I am not sure clusters is a problem or causing any issues.
Other than needing files at startup. How they are used I have yet to
come across.

--
William L. Thomson Jr.

attachment0 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

Emilian Bold-2
In reply to this post by William L. Thomson Jr.
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 [hidden email] mailing list,
this one is closing soon.

--emi


On Fri, Nov 24, 2017 at 10:40 PM, William L. Thomson Jr.
<[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

William L. Thomson Jr.
On Sat, 25 Nov 2017 02:11:35 +0200
Emilian Bold <[hidden email]> wrote:

> 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

Thanks!

> 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.

Sweet as that is likely the direction I am heading. Want more
functionality, bring in more packages, that drop in more jars. To a
single master netbeans folder. Much closer to a normal install just
less stuff.

> 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

Odd, I have that packaged but something must be up with the Bundle
generation. I am not 100% there, but new to reflection. I thought I may
need a CLI for such. It ended up being just a compiler flag/option.
Though I may need to do more there.

To process Bundle.properties and get a Bundle.java/.class I add the
following to compile.
-processor org.netbeans.modules.openide.util.NbBundleProcessor

But it seems to strip out stuff not used. Which maybe happening with
currentVersion. I see it is in the properties. But not in the generated
Bundle.class.

> 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.

Yes I have been mastering a whole slew of things to generate Java
code... A ridiculous amount. Not sure why so many code in Java using
another language. Spring 5.x uses Kotlin. Still have to do stuff with
Scala. Less that use javacc, xjc, scomp, jflex, byaccj, and others.

In some cases I have made CLI wrappers.
https://github.com/javaee/jaxb-istack-commons/pull/2

I was using istack and that for Bundle.properties till I came across
the NbBundleProcessor.

> 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).

Yes I need that to build many pieces. Any file with a NB_BUNDLE=0 is
adding the javac args/flags.
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/eclass/java-netbeans.eclass#L78

> 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

That is made by hand, but the other stuff I do in elcass since I likely
need to do that for all. One  issue I need to bring up. Resources are
mixed in with sources. Ideally resources are in their own directory
with structure. So you can just copy that over recursively.

At the moment moving them over in a flat format, all ended up in base
folder of jar. Not sure if they will be able to be found that way or
need exact paths.

I did have issues with manifest needing to be exactly
META-INF/MANIFEST.MF. So I make sure to upper case that
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/eclass/java-netbeans.eclass#L65

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

Ok sure thing. Should I repost this stuff on that list?

Speaking of which I am using that repo and those sources. I am working
on Nb 9 under Java 9. I was hacking Nb 8.2 for Java 9. Made decent
progress but some stuff was failing under ant via Gentoo's ant eclass.
That was not failing outside with normal ant.

Thus far having little to no issues under Java 9. Only 1 thing needed
fixing. Which I see others were already talking about on another list.
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/dev-java/netbeans-o-n-bootstrap/netbeans-o-n-bootstrap-9999.ebuild#L23
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-June/012934.html

One missing import
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/dev-java/netbeans-o-n-core/netbeans-o-n-core-9999.ebuild#L38

So far no issues, and most of 8.2 is that way. Mostly ran into old
source/target < 1.6 Java 9 did not like. Plus some other stuff.
Example this still doesn't build.
https://github.com/Obsidian-StudiosInc/os-xtoo/blob/master/dev-java/netbeans-platform/netbeans-platform-8.2-r11.ebuild#L113

Had to remove source from nb-javac, as that was failing. So modified
netbean's ant sources and some other stuff.


--
William L. Thomson Jr.

attachment0 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

William L. Thomson Jr.
In reply to this post by Emilian Bold-2
On Fri, 24 Nov 2017 19:39:36 -0500
"William L. Thomson Jr." <[hidden email]> wrote:

> On Sat, 25 Nov 2017 02:11:35 +0200
> Emilian Bold <[hidden email]> wrote:

> > 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  
>
> Odd, I have that packaged but something must be up with the Bundle
> generation. I am not 100% there, but new to reflection. I thought I
> may need a CLI for such. It ended up being just a compiler
> flag/option. Though I may need to do more there.
>
> To process Bundle.properties and get a Bundle.java/.class I add the
> following to compile.
> -processor org.netbeans.modules.openide.util.NbBundleProcessor
I feel like I am missing an argument or something
currentVersion=NetBeans Platform Dev (Build {0})
https://github.com/apache/incubator-netbeans/blob/master/core.startup/src/org/netbeans/core/startup/Bundle.properties#L29

Seems like that variable {0} should be processed by something. Maybe
that is why its being excluded from the generated Bundle.class. I can
easily sed that to some value. Unless I should be passing something to
NbBundleProcessor, like some arguments.

--
William L. Thomson Jr.

attachment0 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

William L. Thomson Jr.
In reply to this post by William L. Thomson Jr.
Last post here, will switch over to new list. Thanks for the fish for a day :)

On Fri, 24 Nov 2017 19:39:36 -0500
"William L. Thomson Jr." <[hidden email]> wrote:
>  One  issue I need to bring up.
> Resources are mixed in with sources. Ideally resources are in their
> own directory with structure. So you can just copy that over
> recursively.
>
> At the moment moving them over in a flat format, all ended up in base
> folder of jar. Not sure if they will be able to be found that way or
> need exact paths.

Looks like how I was copying over resources was the problem. Preserving
directory structure of resources made the difference. currentVersion is
found now.
>Log Session: Saturday, November 25, 2017 at 12:05:54 AM Eastern Standard Time
>System Info:
  Product Version         = NetBeans Platform Dev (Build 9.0_alpha_rc2-os-xtoo)
  Operating System        = Linux version 4.13.11-gentoo running on amd64
  Java; VM; Vendor        = 9.0.1; Java HotSpot(TM) 64-Bit Server VM 9.0.1+11; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 9.0.1+11
  Java Home               = /opt/oracle-jdk-bin-9.0.1
  System Locale; Encoding = en_US; UTF-8
  Home Directory          = /home/wlt
  Current Directory       = /home/wlt
  User Directory          = /home/wlt
  Cache Directory         = /home/wlt/var/cache
  Installation            = /usr/share/netbeans-9


Netbeans is starting for me, but failing at another part. Have to see
whats going on there. Also had an empty license window, but progress :)

java.lang.AssertionError: Has to be NbRepository:
org.openide.filesystems.Repository@36b438b1 at
org.netbeans.core.startup.Main.start(Main.java:281) at
org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98) at
java.base/java.lang.Thread.run(Thread.java:844)

--
William L. Thomson Jr.

attachment0 (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

Emilian Bold-2
I would recommend to switch to the new mailing list because most
activity is over there and you will have more people reading your
emails.

It seems to me you are in for a struggle by basically re-doing the
build system yourself instead of using whatever NetBeans is doing.
Still, it is something doable.

I also twisted in many ways the build system at a previous job so I
recommend you to keep at it. If you get no replies feel free to CC me
directly, I might have some ideas to share.

--emi


On Sat, Nov 25, 2017 at 7:10 AM, William L. Thomson Jr.
<[hidden email]> wrote:

> Last post here, will switch over to new list. Thanks for the fish for a day :)
>
> On Fri, 24 Nov 2017 19:39:36 -0500
> "William L. Thomson Jr." <[hidden email]> wrote:
>>  One  issue I need to bring up.
>> Resources are mixed in with sources. Ideally resources are in their
>> own directory with structure. So you can just copy that over
>> recursively.
>>
>> At the moment moving them over in a flat format, all ended up in base
>> folder of jar. Not sure if they will be able to be found that way or
>> need exact paths.
>
> Looks like how I was copying over resources was the problem. Preserving
> directory structure of resources made the difference. currentVersion is
> found now.
>>Log Session: Saturday, November 25, 2017 at 12:05:54 AM Eastern Standard Time
>>System Info:
>   Product Version         = NetBeans Platform Dev (Build 9.0_alpha_rc2-os-xtoo)
>   Operating System        = Linux version 4.13.11-gentoo running on amd64
>   Java; VM; Vendor        = 9.0.1; Java HotSpot(TM) 64-Bit Server VM 9.0.1+11; Oracle Corporation
>   Runtime                 = Java(TM) SE Runtime Environment 9.0.1+11
>   Java Home               = /opt/oracle-jdk-bin-9.0.1
>   System Locale; Encoding = en_US; UTF-8
>   Home Directory          = /home/wlt
>   Current Directory       = /home/wlt
>   User Directory          = /home/wlt
>   Cache Directory         = /home/wlt/var/cache
>   Installation            = /usr/share/netbeans-9
>
>
> Netbeans is starting for me, but failing at another part. Have to see
> whats going on there. Also had an empty license window, but progress :)
>
> java.lang.AssertionError: Has to be NbRepository:
> org.openide.filesystems.Repository@36b438b1 at
> org.netbeans.core.startup.Main.start(Main.java:281) at
> org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98) at
> java.base/java.lang.Thread.run(Thread.java:844)
>
> --
> William L. Thomson Jr.
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

William L. Thomson Jr.
On Sat, 25 Nov 2017 14:04:08 +0200
Emilian Bold <[hidden email]> wrote:

> I would recommend to switch to the new mailing list because most
> activity is over there and you will have more people reading your
> emails.

Already joined last post here, will start a thread there.

> It seems to me you are in for a struggle by basically re-doing the
> build system yourself instead of using whatever NetBeans is doing.
> Still, it is something doable.

Yes but I do this for many projects. I am close.
https://platform.netbeans.org/tutorials/nbm-runtime-container.html
https://forums.netbeans.org/topic65009.html

Sadly MasterFS does not resolve that for me.

> I also twisted in many ways the build system at a previous job so I
> recommend you to keep at it. If you get no replies feel free to CC me
> directly, I might have some ideas to share.

Not sure if I have build issues I am comparing jars and contents. Could
be missing resources like before or missing jar, or wrong location.

Thanks for the offer and assistance! Much appreciated!

--
William L. Thomson Jr.
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

Emilian Bold-2
I hope you pull it off. And I'm curious if you build becomes any
faster (meaning -- are Gentoo builds parallel with -j or something?).

I also though about using some newer build system for NetBeans, like
Facebook's Buck (https://buckbuild.com/ ) or Google's Bazel
(https://bazel.build/ ), since they are presumably much faster (and
support backend systems to do remote builds for you, build artifacts
caching, etc).

--emi


On Sat, Nov 25, 2017 at 7:14 PM, William L. Thomson Jr.
<[hidden email]> wrote:

> On Sat, 25 Nov 2017 14:04:08 +0200
> Emilian Bold <[hidden email]> wrote:
>
>> I would recommend to switch to the new mailing list because most
>> activity is over there and you will have more people reading your
>> emails.
>
> Already joined last post here, will start a thread there.
>
>> It seems to me you are in for a struggle by basically re-doing the
>> build system yourself instead of using whatever NetBeans is doing.
>> Still, it is something doable.
>
> Yes but I do this for many projects. I am close.
> https://platform.netbeans.org/tutorials/nbm-runtime-container.html
> https://forums.netbeans.org/topic65009.html
>
> Sadly MasterFS does not resolve that for me.
>
>> I also twisted in many ways the build system at a previous job so I
>> recommend you to keep at it. If you get no replies feel free to CC me
>> directly, I might have some ideas to share.
>
> Not sure if I have build issues I am comparing jars and contents. Could
> be missing resources like before or missing jar, or wrong location.
>
> Thanks for the offer and assistance! Much appreciated!
>
> --
> William L. Thomson Jr.
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Netbeans on Gentoo

William L. Thomson Jr.
On Sat, 25 Nov 2017 20:21:11 +0200
Emilian Bold <[hidden email]> wrote:
>
> I hope you pull it off. And I'm curious if you build becomes any
> faster (meaning -- are Gentoo builds parallel with -j or something?).

I will, I am determined like that. I am not sure if it will be faster.
Yes Gentoo portage can merge more than one package at a time via
-j/--jobs.Though due to portage overhead, being slower than a slug at
times. I think over all it maybe slower. Definitely with unpacking, etc.

However users will have uber fine grained control. From stupid slim
with like no function. To all bells and whistles. I will add USE flags
that pull in sets of netbeans packages. But users could grab those one
by one and make their own mix. The flexibility and customization is the
real benefit.

> I also though about using some newer build system for NetBeans, like
> Facebook's Buck (https://buckbuild.com/ ) or Google's Bazel
> (https://bazel.build/ ), since they are presumably much faster (and
> support backend systems to do remote builds for you, build artifacts
> caching, etc).

I would stick with ant. I work with many build systems, not those
though. Most Java is Maven or Gradle. I personally like Gradle for new
stuff just minimal build files. Maven is larger, and ant is pretty
huge. For other stuff autotools, cmake and the new meson. Which seems
people are migrating to meson like crazy. I would not recommend
using python to build Java, but that maybe moot for most.

Main gripe I would say with Netbeans ant is the bundled libraries that
must match to what the build system expects. Otherwise you get failure.
Ideally that stuff should be fetched via ivy or other.

Ant has beauty in simplicity. Need deps add in Ivy. Its pretty hard
to get Maven or Gradle to not fetch stuff. Due to such and needing a
local repo etc. Maven nor Gradle have ever been integrated into Gentoo
build system. Even the ant build system has issues, and needs major
work to support 9 with --release vs source/target. As it has to
re-write build.xml files to change release/source/targets that are hard
coded and classpaths.

IMHO much easier to bypass all that on Gentoo. But that does not help
for others. If portage was faster. It could be used to build stuff. But
I do not see that being an option any time soon. Though could make a
pretty neat Java build system.

P.S.
I really do not like Googles FOSS efforts. I would go more with
Facebook products than Google. I am on the anti-google bandwagon and
really not a fan. They seem to fork vs contribute....
https://github.com/google/conscrypt
https://github.com/google/boringssl

They also produce horrible complex garbage code. Look at all the
google-* packages in my repo. I ended up not using any and went with
json-simple.  For Facebook, 1 Facebook4j. Facebook's GraphQL is very
nice as well. Google REST API's are garbage and horrible complex.
https://github.com/Obsidian-StudiosInc/os-xtoo/tree/master/dev-java/
https://en.wikipedia.org/wiki/GraphQL
https://github.com/facebook/graphql
https://github.com/roundrop/facebook4j

I would never touch Google cloud either. Its crazy complex and makes no
sense. I have worked with most others, AWS, Rackspace, Linode, Digital
Ocean, Vultr, and some others.

Google also has a horrible ego.... Little to nothing of theirs
impresses me or is worth using IMHO. Avoid if you can. IF you can...

-
--
William L. Thomson Jr.