Re: [DISCUSS] Compile with JDK-11 javac --release flag

2021-02-11 Thread Tim Boudreau
>
> Upgrading
> the javac.source (as opposed to target) might cause some issues, due to
> changes to type inferred, although these are probably not very likely.
>

...famous last words...

-Tim


Re: NetBeans platform: roadmap for compatibility with recent JDKs and the Java module system?

2021-02-11 Thread Tim Boudreau
I did the contrib modules - here -
https://github.com/timboudreau/netbeans-contrib

(did that stuff ever get officially donated to Apache?)

I think it's doable.  Have some (ugly, hacky, but worked), tooling I used
to generate pom files for modules and move stuff around - a project I
started in 2011 when I had to mavenize a huge project, that I just keep
around that grows a little whenever I have a refactor-lots-of-random
projects problem.

Most modules will be straightforward.  The hard part is the nbbuild
plumbing, which is very different than any Maven project type.  The maven
nbm plugin might be of some help, dunno.  Probably a lot of it could be
used as-is by the Antrun plugin (but too much of that and we've just
embedded an Ant build in a maven build, which kind of misses the point).

I'd start out by examining and cataloging *exactly* what all the stuff in
nbbuild does, make a list, or a play-by-play of doing a build noting which
pieces do what;  then for each one, make a list of standard maven tools
that could be harnessed to do those things, and the ones with nothing next
to them are the hard part.  Get that done, and the same stuff used to
convert contrib ought to be able to successfully convert most modules in
the codebase without much problem - all of those were written as NetBeans
source-tree modules, so other than a handful that do something unusual when
building, that ought to do the job.

-Tim





On Tue, Feb 9, 2021 at 8:57 AM Eric Bresie  wrote:

> I thought initial attempts to “mavenize” Netbeans had already been
> attempted (I believe by Tim) although maybe that was the contrib projects.
> Are there any plans to switch over to that (i.e. add all the Pom.xml files,
> updated any build documentation, etc.)?  Seems that would help some with
> dependency management in the whole build process
>
> Eric
>
> On Tue, Feb 9, 2021 at 3:43 AM Geertjan Wielenga
>  wrote:
>
> > The Gephi engineers are welcome to introduce Layrry to Apache NetBeans,
> > which appears to imply that all of Apache NetBeans needs to be Mavenized
> as
> > well, which the Gephi engineers are also welcome to contribute. Anyone
> else
> > here are welcome to do the same, it does appear to be a lot of work,
> though
> > it is always welcome.
> >
> > Gj
> >
> > On Tue, Feb 9, 2021 at 10:29 AM Clement Levallois <
> > clementlevall...@protonmail.com> wrote:
> >
> > > The support for loading / offloading of java modules at runtime has
> > > emerged: https://github.com/moditect/layrry
> > >
> > > For the compatibility with recent JDKs, I was referring to:
> > > - nbm-maven-plugin relies on pack200, which has been removed from the
> > JDK (
> > >
> >
> http://mail-archives.apache.org/mod_mbox/netbeans-users/202102.mbox/browser
> > ).
> > > Granted, this is a plugin not the NetBeans platform itself, but as a
> user
> > > of the tool this is blocking.
> > > - not sure about this one but: I think the NetBeans platform relies on
> > > libraries with java.xml or org.w3c namespaces (like batik)? These cause
> > > trouble when loaded in a java modular application.
> > >
> > >
> > >
> > >
> > > --
> > > Clément Levallois
> > > Associate Professor
> > > emlyon business school
> > > Twitter and Skype: @seinecle
> > > mobile: +33(0)6 59 08 33 92
> > >
> > > Sent with ProtonMail  Secure Email.
> > >
> > > ‐‐‐ Original Message ‐‐‐
> > > On Tuesday 9 February 2021 10:11, Geertjan Wielenga <
> > > geertjan.wiele...@googlemail.com> wrote:
> > >
> > > What does it mean "it is not entirely compatible with recent JDKs"?
> > >
> > > Of course, NetBeans uses the NetBeans module system. Let's move to the
> > > Java module system once it supports updates at runtime, i.e., you
> cannot
> > > plug new Java modules into a running Java application, can you?
> > >
> > > Gj
> > >
> > > On Tue, Feb 9, 2021 at 10:05 AM Clement Levallois
> > >  wrote:
> > >
> > >> Dear all,
> > >>
> > >> This is my first message to this list, happy to join!
> > >>
> > >> Gephi (www.gephi.org / https://github.com/gephi/gephi) is a
> successful
> > >> opensource desktop app built on top of the NetBeans platform
> > (release82). I
> > >> am not the maintainer of Gephi but I support its community of users
> > (8.4k
> > >> Facebook group: https://www.facebook.com/groups/gephi), and I have an
> > >> interest in integrating the headless version of Gephi in my own Java
> > >> projects.
> > >>
> > >> If I understand correctly, it seems that NetBeans (release82) is not
> > >> compatible with the Java module system. Also, it is not entirely
> > compatible
> > >> with recent JDKs as far as I am aware.
> > >>
> > >> May I ask what is the roadmap of development for the NetBeans
> platform,
> > >> with regards to compatibility with recent JDKs and in relation with
> the
> > >> Java modules? This would help understand better how is the future of
> > Gephi
> > >> shaping.
> > >>
> > >> Thank you!
> > >>
> > >> Clement
> > >>
> > >> --
> > >> Clément Levallois (@sei

Re: [DISCUSS] Compile with JDK-11 javac --release flag

2021-02-11 Thread Jan Lahoda
The platform/openide.util.lookup module uses javac.source=1.8, so at least
every module that depends on it, either directly or indirectly, effectively
only runs on JDK 8, and hence we can upgrade javac.target to 1.8. Upgrading
the javac.source (as opposed to target) might cause some issues, due to
changes to type inferred, although these are probably not very likely.

Jan

On Fri, Feb 12, 2021 at 6:12 AM Jaroslav Tulach 
wrote:

> Guys, we need some discussion before I dare to move on...
>
> The error in the quoted email below shows that one shouldn't be using
> `Objects.requireNonNull(obj)` when `javac.target=1.6`. There are two ways
> to solve it:
>
> - either rewrite to `if (obj == null) throw NPE();`
> - or by setting `javac.target=1.7` or higher
>
> There are tens of inconsistencies of this kind in our sources. Before we
> start working on a PR, we should know how we want to fix these
> inconsistencies. As such I wanted to bring this issue to your attention.
> -jt
>
> so 28. 11. 2020 v 10:30 odesílatel Jaroslav Tulach <
> jaroslav.tul...@gmail.com> napsal:
>
> > Hi.
> > The release is successfully over, long live the next release!
> >
> > Since the [failure of modern code](
> > https://github.com/apache/netbeans/pull/
> > 2369) experiment, I can't stop thinking about the enormous possibilities
> > NetBeans project could get by adopting `--release` flag of `javac`. There
> > has
> > been numerous voices calling for "coding against never JDK" and that's
> > what
> > the `--release` flag and the nature of [NetBeans Runtime
> Container](http://
> > wiki.apidesign.org/wiki/NetBeans_Runtime_Container) allows us to do.
> > However,
> > let's start with the basics:
> >
> > Let's enable usage of `--release` in our Ant Javac task and let's make it
> > the
> > same as the `javac.target` value:
> >
> > ```diff
> > --- a/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
> > +++ b/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
> > @@ -66,6 +66,11 @@
> >
> >  @Override
> >  public void execute() throws BuildException {
> > +String tgr = getTarget();
> > +if (tgr.matches("\\d+")) {
> > +tgr = "1." + tgr;
> > +}
> > +setRelease(tgr.substring(2));
> >  String src = getSource();
> >  if (src.matches("\\d+")) {
> >  src = "1." + src;
> > ```
> >
> > That immediately shows errors in our code base. Just compile with JDK-11
> > and
> > you'll see errors like:
> >
> > ```bash
> >  [nb-javac] Compiling 8 source files to /netbeans/platform/queries/build/
> > classes
> >  [nb-javac] Ignoring source, target and bootclasspath as release has been
> > set
> >[repeat] warning: [options] source value 6 is obsolete and will be
> > removed
> > in a future release
> >[repeat] warning: [options] target value 1.6 is obsolete and will be
> > removed in a future release
> >[repeat] warning: [options] To suppress warnings about obsolete
> > options,
> > use -Xlint:-options.
> >[repeat] /netbeans/platform/queries/src/org/netbeans/api/queries/
> > VersioningQuery.java:52: error: cannot find symbol
> >[repeat] java.util.Objects.requireNonNull(uri);
> >[repeat]  ^
> >[repeat]   symbol:   class Objects
> >[repeat]   location: package java.util
> >[repeat] 1 error
> >[repeat] 3 warnings
> >   [nbmerge] Failed to build target: all-queries
> > ```
> >
> > What's the problem? In spite our code sets the `javac.target=1.6`, it is
> > using
> > API which isn't present in JDK6. That's wrong. Let's fix that!
> >
> > We need a Travis job using JDK-11 to compile (JDK8 doesn't support the
> `--
> > release` flag and Ant javac task just ignores it) and then we need us to
> > fix all
> > the compilation issues found.
> >
> > If the change is done properly (and the `--release` flag is used at all
> > compilations), we can drop the requirement to use JDK8 to compile Apache
> > NetBeans. Yet the code will still run on JDK8 thanks to using `--release
> > 8` or
> > older. How does that sound?
> >
> > Jaroslav Tulach
> > NetBeans Platform Architect
> >
> >
> >
> >
>


Re: [DISCUSS] Compile with JDK-11 javac --release flag

2021-02-11 Thread Laszlo Kishalmi
Well we should let the past go and occasionally set the javac.target to 
1.8 wherever it is still lower than that.


There could be a debate around the profiler as we even have the code to 
support JVM 1.5, but we need to clean that up as well.


For those who would like to profile older VM-s still have 12.0 or 8.2. 
They are perfect tool for that.



On 2/11/21 9:11 PM, Jaroslav Tulach wrote:

Guys, we need some discussion before I dare to move on...

The error in the quoted email below shows that one shouldn't be using
`Objects.requireNonNull(obj)` when `javac.target=1.6`. There are two ways
to solve it:

- either rewrite to `if (obj == null) throw NPE();`
- or by setting `javac.target=1.7` or higher

There are tens of inconsistencies of this kind in our sources. Before we
start working on a PR, we should know how we want to fix these
inconsistencies. As such I wanted to bring this issue to your attention.
-jt

so 28. 11. 2020 v 10:30 odesílatel Jaroslav Tulach <
jaroslav.tul...@gmail.com> napsal:


Hi.
The release is successfully over, long live the next release!

Since the [failure of modern code](
https://github.com/apache/netbeans/pull/
2369) experiment, I can't stop thinking about the enormous possibilities
NetBeans project could get by adopting `--release` flag of `javac`. There
has
been numerous voices calling for "coding against never JDK" and that's
what
the `--release` flag and the nature of [NetBeans Runtime Container](http://
wiki.apidesign.org/wiki/NetBeans_Runtime_Container) allows us to do.
However,
let's start with the basics:

Let's enable usage of `--release` in our Ant Javac task and let's make it
the
same as the `javac.target` value:

```diff
--- a/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
@@ -66,6 +66,11 @@

  @Override
  public void execute() throws BuildException {
+String tgr = getTarget();
+if (tgr.matches("\\d+")) {
+tgr = "1." + tgr;
+}
+setRelease(tgr.substring(2));
  String src = getSource();
  if (src.matches("\\d+")) {
  src = "1." + src;
```

That immediately shows errors in our code base. Just compile with JDK-11
and
you'll see errors like:

```bash
  [nb-javac] Compiling 8 source files to /netbeans/platform/queries/build/
classes
  [nb-javac] Ignoring source, target and bootclasspath as release has been
set
[repeat] warning: [options] source value 6 is obsolete and will be
removed
in a future release
[repeat] warning: [options] target value 1.6 is obsolete and will be
removed in a future release
[repeat] warning: [options] To suppress warnings about obsolete
options,
use -Xlint:-options.
[repeat] /netbeans/platform/queries/src/org/netbeans/api/queries/
VersioningQuery.java:52: error: cannot find symbol
[repeat] java.util.Objects.requireNonNull(uri);
[repeat]  ^
[repeat]   symbol:   class Objects
[repeat]   location: package java.util
[repeat] 1 error
[repeat] 3 warnings
   [nbmerge] Failed to build target: all-queries
```

What's the problem? In spite our code sets the `javac.target=1.6`, it is
using
API which isn't present in JDK6. That's wrong. Let's fix that!

We need a Travis job using JDK-11 to compile (JDK8 doesn't support the `--
release` flag and Ant javac task just ignores it) and then we need us to
fix all
the compilation issues found.

If the change is done properly (and the `--release` flag is used at all
compilations), we can drop the requirement to use JDK8 to compile Apache
NetBeans. Yet the code will still run on JDK8 thanks to using `--release
8` or
older. How does that sound?

Jaroslav Tulach
NetBeans Platform Architect






-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: [DISCUSS] Compile with JDK-11 javac --release flag

2021-02-11 Thread Jaroslav Tulach
Guys, we need some discussion before I dare to move on...

The error in the quoted email below shows that one shouldn't be using
`Objects.requireNonNull(obj)` when `javac.target=1.6`. There are two ways
to solve it:

- either rewrite to `if (obj == null) throw NPE();`
- or by setting `javac.target=1.7` or higher

There are tens of inconsistencies of this kind in our sources. Before we
start working on a PR, we should know how we want to fix these
inconsistencies. As such I wanted to bring this issue to your attention.
-jt

so 28. 11. 2020 v 10:30 odesílatel Jaroslav Tulach <
jaroslav.tul...@gmail.com> napsal:

> Hi.
> The release is successfully over, long live the next release!
>
> Since the [failure of modern code](
> https://github.com/apache/netbeans/pull/
> 2369) experiment, I can't stop thinking about the enormous possibilities
> NetBeans project could get by adopting `--release` flag of `javac`. There
> has
> been numerous voices calling for "coding against never JDK" and that's
> what
> the `--release` flag and the nature of [NetBeans Runtime Container](http://
> wiki.apidesign.org/wiki/NetBeans_Runtime_Container) allows us to do.
> However,
> let's start with the basics:
>
> Let's enable usage of `--release` in our Ant Javac task and let's make it
> the
> same as the `javac.target` value:
>
> ```diff
> --- a/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
> +++ b/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
> @@ -66,6 +66,11 @@
>
>  @Override
>  public void execute() throws BuildException {
> +String tgr = getTarget();
> +if (tgr.matches("\\d+")) {
> +tgr = "1." + tgr;
> +}
> +setRelease(tgr.substring(2));
>  String src = getSource();
>  if (src.matches("\\d+")) {
>  src = "1." + src;
> ```
>
> That immediately shows errors in our code base. Just compile with JDK-11
> and
> you'll see errors like:
>
> ```bash
>  [nb-javac] Compiling 8 source files to /netbeans/platform/queries/build/
> classes
>  [nb-javac] Ignoring source, target and bootclasspath as release has been
> set
>[repeat] warning: [options] source value 6 is obsolete and will be
> removed
> in a future release
>[repeat] warning: [options] target value 1.6 is obsolete and will be
> removed in a future release
>[repeat] warning: [options] To suppress warnings about obsolete
> options,
> use -Xlint:-options.
>[repeat] /netbeans/platform/queries/src/org/netbeans/api/queries/
> VersioningQuery.java:52: error: cannot find symbol
>[repeat] java.util.Objects.requireNonNull(uri);
>[repeat]  ^
>[repeat]   symbol:   class Objects
>[repeat]   location: package java.util
>[repeat] 1 error
>[repeat] 3 warnings
>   [nbmerge] Failed to build target: all-queries
> ```
>
> What's the problem? In spite our code sets the `javac.target=1.6`, it is
> using
> API which isn't present in JDK6. That's wrong. Let's fix that!
>
> We need a Travis job using JDK-11 to compile (JDK8 doesn't support the `--
> release` flag and Ant javac task just ignores it) and then we need us to
> fix all
> the compilation issues found.
>
> If the change is done properly (and the `--release` flag is used at all
> compilations), we can drop the requirement to use JDK8 to compile Apache
> NetBeans. Yet the code will still run on JDK8 thanks to using `--release
> 8` or
> older. How does that sound?
>
> Jaroslav Tulach
> NetBeans Platform Architect
>
>
>
>


Re: NetBeans platform: roadmap for compatibility with recent JDKs and the Java module system?

2021-02-11 Thread Eric Bresie
I don’t think there is much more that hasn’t been said but I posed the
question here on OpenJDK mailing list on runtime swappable JPMS

https://mail.openjdk.java.net/pipermail/jdk-dev/2021-February/005064.html


On Tue, Feb 9, 2021 at 5:04 AM Neil C Smith  wrote:

> On Tue, 9 Feb 2021 at 09:30, Clement Levallois
>  wrote:
> > The support for loading / offloading of java modules at runtime has
> emerged: https://github.com/moditect/layrry
>
> Well, the support for doing this was always there within JPMS, obviously.
>
> A more interesting thing to look at given NetBeans concerns might be
> something like https://github.com/apache/felix-atomos ? eg. OSGi JPMS
> interop. I'm not sure how accurate this old wiki page on compatibility
> between NetBeans modules and OSGi still is?
> http://wiki.netbeans.org/NetBeansInOSGi  But useful in also
> considering what NetBeans module system offers (and relies on) over
> and above what JPMS does too.
>
> I'm not sure how useful it is to conflate issues of compatibility with
> recent JDKs and use of JPMS.  First should be, and is, a high priority
> here.
>
> Best wishes,
>
> Neil
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
> --
Eric Bresie
ebre...@gmail.com


Re: Interesting article

2021-02-11 Thread Lars Bruun-Hansen
Yes, but Java world has two good things going for it:

- Java world learned early on (thanks to Maven) that released
artifacts must be immutable. No exceptions!  I've been struck with how
that lesson is only very slowly filtering into the Docker and npm
world, if at all yet. And yes, they have been bitten by it. Both of
them.
- Maven Central has always insisted on some quite heavy vetting
principles. I cannot get permission to publish into a namespace I
don't own. In the pursuit of eco-system growth many of those other
communities have ignored such principles. (In the Java world: I'm not
overly saddened by JFrog's decision to shut down Bintray for this same
reason)

/Lars

On Thu, Feb 11, 2021 at 9:57 PM John Kostaras  wrote:
>
> I thought I would share. It doesn't address java, but it could be done in
> maven or netbeans repos, too.
> https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: [VOTE] Apache NetBeans 12.0-u2

2021-02-11 Thread Matthias Bläsing
+1 (binding)

- checked SHA512 and signature
- checked that contents of zip and git tag 12.0-u2 are identical apart 
  from the expected differences
- checked NOTICE + LICENSE
- builds on OpenJDK 1.8.0_262
- tested opening and running maven project on JDK, nbjavac was 
  installed after opening started, works

Positivly surprised about FlatLaf, looks good, will see if I change my
main runtime from Metal.

Am Dienstag, den 09.02.2021, 21:29 -0800 schrieb Laszlo Kishalmi:
> Dear all,
> 
> This is the voting candidate for the 12.0 update 2 release of Apache
> NetBeans. This release is identical to 12.0-u1 except for the following
> backported fixes for -
> 
> [NETBEANS-5336] Replace jcenter() to mavenCentral() in Gradle Projects
> [NETBEANS-3342] Fix Netbeans Installer on macOS to work with Java 8 and 11+
> [NETBEANS-4617] Flush Gradle Standard output in 200ms if it stalled
> [NETBEANS-4123] PAC evaluator scripts runs just one at a time.
> Include both KDE4 and KDE5 proxy settings.
> [NETBEANS-] The selected text is not removed in the Find Combobox
> [NETBEANS-3409] Missing popup menu for sql editor tabs
> [NETBEANS-4722] Add JAVA_HOME to Gradle build environment variables
> [NETBEANS-4627] FlatLaf: fix wrong background color of search result
> [NETBEANS-3428] FlatLaf: fix selection background color in output view
> 
> The build artifacts are available at:
> 
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/  
> 
> 
> We are voting on
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/netbeans-12.0-u2-source.zip
>   
> 
> 
> SHA512:
> 
> 72783736d5163c07d5b2ee1bb51816294263eef863efad6b6ddb83342c45f267d96682825c072c68dc42571b6e20d56b45729c8e447708fcc04948926bf5c775
> 
> There is no full binary distribution for this update release all
> convenience binaries are available as nbm packages. The folder:
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/nbms/  
>   
> 
> The weak point of an update release is the handcrafted updates.xml which is 
> hard to be tested without the binaries reaching their final location.
> The following modules were updated in this release:
> 
> ./ide/org-netbeans-modules-editor-search.nbm
> ./groovy/org-netbeans-modules-gradle.nbm
> ./platform/org-openide-filesystems-compat8.nbm
> ./platform/org-netbeans-swing-laf-flatlaf.nbm
> ./platform/org-netbeans-core-network.nbm
> 
> Please check if their distribution url points right and their description 
> matches:
> https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release120/28/artifact/dist/netbeans/nbms/updates.xml
> 
> The updates themselves can be installed and tested by adding the following UC 
> to your NetBeans 12.0 installation:
> https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release120/28/artifact/dist/netbeans/nbms/updates.xml.gz
> 
> Before voting! See requirements below!
> 
> KEYS file:
> https://dist.apache.org/repos/dist/release/netbeans/KEYS
> 
> 
> Before voting +1 you are required to download the signed source code
> package, compile it as provided, and test the resulting executable on
> your own platform, along with also verifying that the package meets
> the requirements of the ASF policy on releases - see
> http://www.apache.org/legal/release-policy.html#management
> 
> In particular, you should (at least) follow these steps.
> 
> 1. Download the artifact to be voted on and unzip it.
> 2. Check that the ariefact does not contain any jar files, except for:
> -
> platform/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/empty.jar
> - enterprise/glassfish.common/test/unit/data/nottaDir-4_1_2.jar
> - enterprise/glassfish.common/test/unit/data/subdir/nottaDir-5.0.jar
> - enterprise/payara.common/test/unit/data/nottaDir-4_1_2.jar
> - enterprise/payara.common/test/unit/data/subdir/nottaDir-5.0.jar
> which are only jars by their name
> 3. Verify the cryptographic signatures, the NOTICE and LICENSE file
> 4. Build it using the README provided by the artefact.
> 5. Look in nbbuild/netbeans for the NetBeans installation created by
> the build process and try running it.
> 
> 
> In addition to checking the sources, you should check the associated
> convenience binary NBMs at the artifact links above. As well as
> checking any artifact functions correctly, you should check that it
> has been correctly signed by a PMC member, and that the source being
> voted on is sufficient to build the relevant binary.
> 
> 
> This vote is going to be open at least 72 hours, vote with +1, 0, and
> -1 as usual. Please mark your vote with (binding) if you're an Apache
> NetBeans PMC member to help with voting admin.
> 
> Thank you all!
> 
> --
> 
>     Laszlo Kishalmi
> 



--

Interesting article

2021-02-11 Thread John Kostaras
I thought I would share. It doesn't address java, but it could be done in
maven or netbeans repos, too.
https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610


Re: Compiling NetBeans from source on macos

2021-02-11 Thread Neil C Smith
On Thu, 11 Feb 2021 at 17:18, Laszlo Kishalmi  wrote:
> Most probably your build is still using Java 15 Secretly. I'd recommend
> you to check your property files. Maybe try to run ant with --debug
> output it in a file and try to look for java 15, to detect how that gets
> infiltrated into your process.

At a guess this might be JAVA_HOME being wrong, or missing entirely
and ant finding the wrong JDK - something familiar-ish about
https://github.com/apache/ant/blob/master/src/script/ant#L128

Jeremy, have you tried doing -

export JAVA_HOME=/path/to/jdk
ant build

??

Best wishes,

Neil

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Compiling NetBeans from source on macos

2021-02-11 Thread Christian Oyarzun
Hi Jeremy,

I would try the following:

export JAVA_HOME=/path/to/java11home
export PATH=$JAVA_HOME/bin:$PATH

create a user.build.properties in nbbuild with the following line:

nbjdk.home=/path/to/java11home

Then compile with

ant build -Dpermit.jdk9.builds=true

--Christian


On Thu, Feb 11, 2021 at 11:58 AM Jeremy Cavanagh 
wrote:

> Hi,
>
> I have had absolutely no luck whatsoever. I've tried all possible
> variants with both jdk 8 and jdk 11, but, they all end in failure with
> the same error:
>
> Java 15 has removed Nashorn, you must provide an engine for running
> JavaScript yourself. GraalVM JavaScript currently is the preferred option.
>
> BUILD FAILED
> /Users/jeremycavanagh/Downloads/netbeans-12.3-beta2-source/nbbuild/build.xml:509:
>
> The following error occurred while executing this line:
> /Users/jeremycavanagh/Downloads/netbeans-12.3-beta2-source/nbbuild/build/langtools/make/build.xml:91:
>
> Unable to create javax script engine for javascript
>
> All requirements as far as I can tell are satisfied:
>
> $ java -version
> openjdk version "11.0.9.1" 2020-11-04 LTS
> OpenJDK Runtime Environment Zulu11.43+55-CA (build 11.0.9.1+1-LTS)
> OpenJDK 64-Bit Server VM Zulu11.43+55-CA (build 11.0.9.1+1-LTS, mixed mode)
> $ js -version
> GraalVM JavaScript (GraalVM CE Native 21.0.0)
> $ ant -version
> Apache Ant(TM) version 1.10.9 compiled on September 27 2020
>
> I have used, the following build commands:
>
> $ant
> $ant build
> $ant build -Dpermit.jdk9.builds=true
>
> My searching on the internet led me to:
>
> https://bugs.openjdk.java.net/browse/JDK-8243000
>
> https://lists.apache.org/x/thread.html/r218c7d21ee1933ea65a206bc906824d557c23aa17ab67f86a1336a0f@%3Cdev.netbeans.apache.org%3E
>
> Unfortunately, neither provides any help.
>
> I normally don't try building from source having succeeded once in the
> last few years, but, want to do so to aid my understanding of NetBeans
> and try some of my own ideas.
>
> Any ideas, suggestions or corrections to my attempts would be very much
> appreciated.
>
> Regards to all,
>
> Jeremy
>
> P.S., Stay Home, Stay Safe & Stay Healthy
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>


Re: Compiling NetBeans from source on macos

2021-02-11 Thread Laszlo Kishalmi
Most probably your build is still using Java 15 Secretly. I'd recommend 
you to check your property files. Maybe try to run ant with --debug 
output it in a file and try to look for java 15, to detect how that gets 
infiltrated into your process.


On 2/11/21 8:58 AM, Jeremy Cavanagh wrote:

Hi,

I have had absolutely no luck whatsoever. I've tried all possible 
variants with both jdk 8 and jdk 11, but, they all end in failure with 
the same error:


Java 15 has removed Nashorn, you must provide an engine for running 
JavaScript yourself. GraalVM JavaScript currently is the preferred 
option.


BUILD FAILED
/Users/jeremycavanagh/Downloads/netbeans-12.3-beta2-source/nbbuild/build.xml:509: 
The following error occurred while executing this line:
/Users/jeremycavanagh/Downloads/netbeans-12.3-beta2-source/nbbuild/build/langtools/make/build.xml:91: 
Unable to create javax script engine for javascript


All requirements as far as I can tell are satisfied:

$ java -version
openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment Zulu11.43+55-CA (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu11.43+55-CA (build 11.0.9.1+1-LTS, mixed 
mode)

$ js -version
GraalVM JavaScript (GraalVM CE Native 21.0.0)
$ ant -version
Apache Ant(TM) version 1.10.9 compiled on September 27 2020

I have used, the following build commands:

$ant
$ant build
$ant build -Dpermit.jdk9.builds=true

My searching on the internet led me to:

https://bugs.openjdk.java.net/browse/JDK-8243000
https://lists.apache.org/x/thread.html/r218c7d21ee1933ea65a206bc906824d557c23aa17ab67f86a1336a0f@%3Cdev.netbeans.apache.org%3E 



Unfortunately, neither provides any help.

I normally don't try building from source having succeeded once in the 
last few years, but, want to do so to aid my understanding of NetBeans 
and try some of my own ideas.


Any ideas, suggestions or corrections to my attempts would be very 
much appreciated.


Regards to all,

Jeremy

P.S., Stay Home, Stay Safe & Stay Healthy

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Compiling NetBeans from source on macos

2021-02-11 Thread Jeremy Cavanagh

Hi,

I have had absolutely no luck whatsoever. I've tried all possible 
variants with both jdk 8 and jdk 11, but, they all end in failure with 
the same error:


Java 15 has removed Nashorn, you must provide an engine for running 
JavaScript yourself. GraalVM JavaScript currently is the preferred option.


BUILD FAILED
/Users/jeremycavanagh/Downloads/netbeans-12.3-beta2-source/nbbuild/build.xml:509: 
The following error occurred while executing this line:
/Users/jeremycavanagh/Downloads/netbeans-12.3-beta2-source/nbbuild/build/langtools/make/build.xml:91: 
Unable to create javax script engine for javascript


All requirements as far as I can tell are satisfied:

$ java -version
openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment Zulu11.43+55-CA (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu11.43+55-CA (build 11.0.9.1+1-LTS, mixed mode)
$ js -version
GraalVM JavaScript (GraalVM CE Native 21.0.0)
$ ant -version
Apache Ant(TM) version 1.10.9 compiled on September 27 2020

I have used, the following build commands:

$ant
$ant build
$ant build -Dpermit.jdk9.builds=true

My searching on the internet led me to:

https://bugs.openjdk.java.net/browse/JDK-8243000
https://lists.apache.org/x/thread.html/r218c7d21ee1933ea65a206bc906824d557c23aa17ab67f86a1336a0f@%3Cdev.netbeans.apache.org%3E

Unfortunately, neither provides any help.

I normally don't try building from source having succeeded once in the 
last few years, but, want to do so to aid my understanding of NetBeans 
and try some of my own ideas.


Any ideas, suggestions or corrections to my attempts would be very much 
appreciated.


Regards to all,

Jeremy

P.S., Stay Home, Stay Safe & Stay Healthy

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: [VOTE] Apache NetBeans 12.0-u2

2021-02-11 Thread Neil C Smith
+1 (binding)

Checked files and build, and checked install of updates in 12.0.

Thanks Laszlo!

Best wishes,

Neil

On Wed, 10 Feb 2021 at 05:29, Laszlo Kishalmi  wrote:
>
> Dear all,
>
> This is the voting candidate for the 12.0 update 2 release of Apache
> NetBeans. This release is identical to 12.0-u1 except for the following
> backported fixes for -
>
> [NETBEANS-5336] Replace jcenter() to mavenCentral() in Gradle Projects
> [NETBEANS-3342] Fix Netbeans Installer on macOS to work with Java 8 and 11+
> [NETBEANS-4617] Flush Gradle Standard output in 200ms if it stalled
> [NETBEANS-4123] PAC evaluator scripts runs just one at a time.
> Include both KDE4 and KDE5 proxy settings.
> [NETBEANS-] The selected text is not removed in the Find Combobox
> [NETBEANS-3409] Missing popup menu for sql editor tabs
> [NETBEANS-4722] Add JAVA_HOME to Gradle build environment variables
> [NETBEANS-4627] FlatLaf: fix wrong background color of search result
> [NETBEANS-3428] FlatLaf: fix selection background color in output view
>
> The build artifacts are available at:
>
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/  
> 
>
> We are voting on
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/netbeans-12.0-u2-source.zip
>   
> 
>
> SHA512:
>
> 72783736d5163c07d5b2ee1bb51816294263eef863efad6b6ddb83342c45f267d96682825c072c68dc42571b6e20d56b45729c8e447708fcc04948926bf5c775
>
> There is no full binary distribution for this update release all
> convenience binaries are available as nbm packages. The folder:
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/nbms/  
> 
>
> The weak point of an update release is the handcrafted updates.xml which is 
> hard to be tested without the binaries reaching their final location.
> The following modules were updated in this release:
>
> ./ide/org-netbeans-modules-editor-search.nbm
> ./groovy/org-netbeans-modules-gradle.nbm
> ./platform/org-openide-filesystems-compat8.nbm
> ./platform/org-netbeans-swing-laf-flatlaf.nbm
> ./platform/org-netbeans-core-network.nbm
>
> Please check if their distribution url points right and their description 
> matches:
> https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release120/28/artifact/dist/netbeans/nbms/updates.xml
>
> The updates themselves can be installed and tested by adding the following UC 
> to your NetBeans 12.0 installation:
> https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbeans/job/release120/28/artifact/dist/netbeans/nbms/updates.xml.gz
>
> Before voting! See requirements below!
>
> KEYS file:
> https://dist.apache.org/repos/dist/release/netbeans/KEYS
>
>
> Before voting +1 you are required to download the signed source code
> package, compile it as provided, and test the resulting executable on
> your own platform, along with also verifying that the package meets
> the requirements of the ASF policy on releases - see
> http://www.apache.org/legal/release-policy.html#management
>
> In particular, you should (at least) follow these steps.
>
> 1. Download the artifact to be voted on and unzip it.
> 2. Check that the ariefact does not contain any jar files, except for:
> -
> platform/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/empty.jar
> - enterprise/glassfish.common/test/unit/data/nottaDir-4_1_2.jar
> - enterprise/glassfish.common/test/unit/data/subdir/nottaDir-5.0.jar
> - enterprise/payara.common/test/unit/data/nottaDir-4_1_2.jar
> - enterprise/payara.common/test/unit/data/subdir/nottaDir-5.0.jar
> which are only jars by their name
> 3. Verify the cryptographic signatures, the NOTICE and LICENSE file
> 4. Build it using the README provided by the artefact.
> 5. Look in nbbuild/netbeans for the NetBeans installation created by
> the build process and try running it.
>
>
> In addition to checking the sources, you should check the associated
> convenience binary NBMs at the artifact links above. As well as
> checking any artifact functions correctly, you should check that it
> has been correctly signed by a PMC member, and that the source being
> voted on is sufficient to build the relevant binary.
>
>
> This vote is going to be open at least 72 hours, vote with +1, 0, and
> -1 as usual. Please mark your vote with (binding) if you're an Apache
> NetBeans PMC member to help with voting admin.
>
> Thank you all!
>
> --
>
> Laszlo Kishalmi
>

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: NB 12.3 schedule update

2021-02-11 Thread Neil C Smith
On Tue, 9 Feb 2021 at 12:14, Neil C Smith  wrote:
> We're also waiting on https://github.com/apache/netbeans/pull/2724 to
> see if it can be included.  This is an nb-javac update with fix for
> NETBEANS-5055 and (partially IMO) NETBEANS-5109.
>
> Having liaised with Geertjan, we'll aim to prepare the beta on
> Thursday, which gives a little more time to get the above in, or speak
> up if there's anything else urgent to be considered!

Schedule updates are like buses! :-)

See comments on https://github.com/apache/netbeans/pull/2724 - it
would be good to fix NETBEANS-5055 for 12.3, but there are
workarounds, so we'll see whether it's feasible to get a fix in by
Tues 16th.  Either way we'll roll beta3 then, with the intention of
that also being the voting candidate after testing.

Again, do speak up if any concerns on that!

Thanks and best wishes,

Neil

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Update vote catalog testing (was Re: [VOTE] Apache NetBeans 12.0-u2)

2021-02-11 Thread Neil C Smith
On Wed, 10 Feb 2021 at 05:29, Laszlo Kishalmi  wrote:
> There is no full binary distribution for this update release all
> convenience binaries are available as nbm packages. The folder:
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/nbms/  
> 
>
> The weak point of an update release is the handcrafted updates.xml which is 
> hard to be tested without the binaries reaching their final location.

While it isn't perfect, for 11.2-u1 voting we had a parallel
updates.xml on the VM (called something like updates-u1.xml.gz I
think) with the changes in place but URLs pointing to
dist.a.o/dev.  It did actually flag an issue too.  I'm not sure about
using the ci-build updates file for testing - the more we layer update
releases, the more problematic that might become?

Also a question whether in future the updates file has to be included
in an update release, and if so, whether it should be just the updated
nbms?

Of course, as I'm fond of saying, we only release sources, so any
issue here is probably fixable in post! :-)

Still, as Geertjan's been working through getting the release docs on
the wiki updated as we work through 12.3, it would also be good to
document update releases properly too.

I'll check and vote on 12.0-u2 soon!  Thanks.

Best wishes,

Neil

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





RE: [VOTE] Apache NetBeans 12.0-u2

2021-02-11 Thread Eric Barboni
+1 (binding)

Checksum sign ok. Update.xml ok.

Info.xml in the nbm contains reference to deadlock.netbeans.org. 

Thanks for the work
Best Regards
Eric

-Message d'origine-
De : Jaroslav Tulach  
Envoyé : jeudi 11 février 2021 06:51
À : Apache NetBeans 
Objet : Re: [VOTE] Apache NetBeans 12.0-u2

+1 (binding)

Checksum of sources is OK. They build on Ubuntu 20.04. I can run the IDE, 
create a Maven project, edit, compile, execute.

I can install the NBM files from provided update catalog into fresh NetBeans
12.0 (with u1 applied), create a Maven project, edit, compile, execute.

Thanks a lot for doing this work Laszlo!
-jt

Dne středa 10. února 2021 6:29:29 CET, Laszlo Kishalmi napsal(a):
> Dear all,
> 
> This is the voting candidate for the 12.0 update 2 release of Apache 
> NetBeans. This release is identical to 12.0-u1 except for the 
> following backported fixes for -
> 
> [NETBEANS-5336] Replace jcenter() to mavenCentral() in Gradle Projects 
> [NETBEANS-3342] Fix Netbeans Installer on macOS to work with Java 8 
> and 11+ [NETBEANS-4617] Flush Gradle Standard output in 200ms if it 
> stalled [NETBEANS-4123] PAC evaluator scripts runs just one at a time.
> Include both KDE4 and KDE5 proxy settings.
> [NETBEANS-] The selected text is not removed in the Find Combobox 
> [NETBEANS-3409] Missing popup menu for sql editor tabs [NETBEANS-4722] 
> Add JAVA_HOME to Gradle build environment variables [NETBEANS-4627] 
> FlatLaf: fix wrong background color of search result [NETBEANS-3428] 
> FlatLaf: fix selection background color in output view
> 
> The build artifacts are available at:
> 
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/
> 
> 
> We are voting on
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/netbe
> ans-12
> .0-u2-source.zip
>  eans-> 12.0-u1-source.zip>
> 
> SHA512:
> 
> 72783736d5163c07d5b2ee1bb51816294263eef863efad6b6ddb83342c45f267d96682
> 825c07
> 2c68dc42571b6e20d56b45729c8e447708fcc04948926bf5c775
> 
> There is no full binary distribution for this update release all 
> convenience binaries are available as nbm packages. The folder:
> https://dist.apache.org/repos/dist/dev/netbeans/netbeans/12.0-u2/nbms/
>  />
> 
> The weak point of an update release is the handcrafted updates.xml 
> which is hard to be tested without the binaries reaching their final 
> location. The following modules were updated in this release:
> 
> ./ide/org-netbeans-modules-editor-search.nbm
> ./groovy/org-netbeans-modules-gradle.nbm
> ./platform/org-openide-filesystems-compat8.nbm
> ./platform/org-netbeans-swing-laf-flatlaf.nbm
> ./platform/org-netbeans-core-network.nbm
> 
> Please check if their distribution url points right and their 
> description
> matches:
> https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbean
> s/job /release120/28/artifact/dist/netbeans/nbms/updates.xml
> 
> The updates themselves can be installed and tested by adding the 
> following UC to your NetBeans 12.0 installation:
> https://ci-builds.apache.org/job/Netbeans/job/netbeans-TLP/job/netbean
> s/job /release120/28/artifact/dist/netbeans/nbms/updates.xml.gz
> 
> Before voting! See requirements below!
> 
> KEYS file:
> https://dist.apache.org/repos/dist/release/netbeans/KEYS
> 
> 
> Before voting +1 you are required to download the signed source code 
> package, compile it as provided, and test the resulting executable on 
> your own platform, along with also verifying that the package meets 
> the requirements of the ASF policy on releases - see 
> http://www.apache.org/legal/release-policy.html#management
> 
> In particular, you should (at least) follow these steps.
> 
> 1. Download the artifact to be voted on and unzip it.
> 2. Check that the ariefact does not contain any jar files, except for:
> -
> platform/autoupdate.services/test/unit/src/org/netbeans/api/autoupdate
> /data/ empty.jar - 
> enterprise/glassfish.common/test/unit/data/nottaDir-4_1_2.jar
> - enterprise/glassfish.common/test/unit/data/subdir/nottaDir-5.0.jar
> - enterprise/payara.common/test/unit/data/nottaDir-4_1_2.jar
> - enterprise/payara.common/test/unit/data/subdir/nottaDir-5.0.jar
> which are only jars by their name
> 3. Verify the cryptographic signatures, the NOTICE and LICENSE file 4. 
> Build it using the README provided by the artefact.
> 5. Look in nbbuild/netbeans for the NetBeans installation created by 
> the build process and try running it.
> 
> 
> In addition to checking the sources, you should check the associated 
> convenience binary NBMs at the artifact links above. As well as 
> checking any artifact functions correctly, you should check that it 
> has been correctly signed by a PMC member, and that the source being 
> voted on is sufficient to build the relevant binary.
>