Re: [Math] "mvn commons-build:download-page" fails with Java 11

2022-12-13 Thread Alex Herbert
On Tue, 13 Dec 2022 at 01:05, Gilles Sadowski  wrote:
>
> Hello.
>
> Running
> $ JAVA_HOME=~/java/jdk/oracle/jdk1.8.0_333 mvn commons-build:download-page
> [...]
> [INFO] BUILD SUCCESS
> [...]
>
> Running
> $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ mvn 
> commons-build:download-page
> [...]
> [ERROR] Failed to execute goal
> org.apache.commons:commons-build-plugin:1.12:download-page
> (default-cli) on project commons-math4-core: Failed to execute:
> Executing Ant script: generate-xdocs.build.xml [download-page]: Failed
> to execute.: The following error occurred while executing this line:
> [ERROR] /tmp/plexus-ant-component18328128830526809687.build.xml:215:
> Unable to create javax script engine for javascript
> [...]

I did not find a solution for this when doing the latest releases. I
put this note in the release notes doc:

Note: This command presently requires Java 8.

Alex

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



Re: [Math] "mvn commons-build:download-page" fails with Java 11

2022-12-13 Thread Gilles Sadowski
Hi.

Le mar. 13 déc. 2022 à 10:01, Alex Herbert  a écrit :
>
> On Tue, 13 Dec 2022 at 01:05, Gilles Sadowski  wrote:
> >
> > Hello.
> >
> > Running
> > $ JAVA_HOME=~/java/jdk/oracle/jdk1.8.0_333 mvn commons-build:download-page
> > [...]
> > [INFO] BUILD SUCCESS
> > [...]
> >
> > Running
> > $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ mvn 
> > commons-build:download-page
> > [...]
> > [ERROR] Failed to execute goal
> > org.apache.commons:commons-build-plugin:1.12:download-page
> > (default-cli) on project commons-math4-core: Failed to execute:
> > Executing Ant script: generate-xdocs.build.xml [download-page]: Failed
> > to execute.: The following error occurred while executing this line:
> > [ERROR] /tmp/plexus-ant-component18328128830526809687.build.xml:215:
> > Unable to create javax script engine for javascript
> > [...]
>
> I did not find a solution for this when doing the latest releases. I
> put this note in the release notes doc:
>
> Note: This command presently requires Java 8.

Yes, I was checking back and forth if there were differences between the
"howto" document in [Math] and [RNG], and I noticed that remark, but
somehow I translated it to "This does not work for *older* JDK anymore"
(i.e. in the same way that we say "Requires Java 8" in the release notes
of a component).  [Does the error imply that there is a bug in the "script"
mentioned ("generate-xdocs.build.xml")?]

Since we are trying to process the release of all math-related components
in the same way, wouldn't it be better to have a single "howto" document?

Regards,
Gilles

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



Re: [Math] "mvn commons-build:download-page" fails with Java 11

2022-12-13 Thread Gary Gregory
You can look at how Commons Text builds, basically, JavaScript (Nashorn)
was removed from the JRE, so you have to add a JS engine like GraalVM.

Gary

On Tue, Dec 13, 2022, 04:01 Alex Herbert  wrote:

> On Tue, 13 Dec 2022 at 01:05, Gilles Sadowski 
> wrote:
> >
> > Hello.
> >
> > Running
> > $ JAVA_HOME=~/java/jdk/oracle/jdk1.8.0_333 mvn
> commons-build:download-page
> > [...]
> > [INFO] BUILD SUCCESS
> > [...]
> >
> > Running
> > $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ mvn
> commons-build:download-page
> > [...]
> > [ERROR] Failed to execute goal
> > org.apache.commons:commons-build-plugin:1.12:download-page
> > (default-cli) on project commons-math4-core: Failed to execute:
> > Executing Ant script: generate-xdocs.build.xml [download-page]: Failed
> > to execute.: The following error occurred while executing this line:
> > [ERROR] /tmp/plexus-ant-component18328128830526809687.build.xml:215:
> > Unable to create javax script engine for javascript
> > [...]
>
> I did not find a solution for this when doing the latest releases. I
> put this note in the release notes doc:
>
> Note: This command presently requires Java 8.
>
> Alex
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


[Math] Release hurdles

2022-12-13 Thread Gilles Sadowski
Hello.

I'm at the step that should upload the artefacts to the "nexus" server:
  $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -Duser.name=erans
clean deploy -Prelease

I get this message:
---CUT---
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
(default-deploy) on project commons-math4-core: Failed to deploy
artifacts: Could not transfer artifact
org.apache.commons:commons-math4-core:jar:4.0-20221213.133952-543
from/to apache.snapshots.https
(https://repository.apache.org/content/repositories/snapshots):
Transfer failed for
https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-math4-core/4.0-SNAPSHOT/commons-math4-core-4.0-20221213.133952-543.jar
401 Unauthorized
---CUT---

I don't remember that the "apache.snapshots.https" is the right reference
when "-Prelease" is set...

I've also tried (as hinted at in the notes for [RNG]):
  $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -Dusername=erans
-Dcommons.distServer=apache.releases clean deploy -Prelease

where "apache.releases" is a server identifier defined in my
  ~/.m2/settings.xml
file, together with URL
  https://repository.apache.org/content/repositories/staging/
and my ASF username/password.

Regards,
Gilles

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



Re: [Math] Release hurdles

2022-12-13 Thread sebb
On Tue, 13 Dec 2022 at 14:09, Gilles Sadowski  wrote:
>
> Hello.
>
> I'm at the step that should upload the artefacts to the "nexus" server:
>   $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -Duser.name=erans
> clean deploy -Prelease
>
> I get this message:
> ---CUT---
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
> (default-deploy) on project commons-math4-core: Failed to deploy
> artifacts: Could not transfer artifact
> org.apache.commons:commons-math4-core:jar:4.0-20221213.133952-543
> from/to apache.snapshots.https
> (https://repository.apache.org/content/repositories/snapshots):
> Transfer failed for
> https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-math4-core/4.0-SNAPSHOT/commons-math4-core-4.0-20221213.133952-543.jar
> 401 Unauthorized
> ---CUT---
>
> I don't remember that the "apache.snapshots.https" is the right reference
> when "-Prelease" is set...

AFAIK the Maven repo type depends on the version; if it contains
SNAPSHOT, then it is a snapshot ...

You need to ensure that the version in the pom.xml file is set to the
desired release version.
Note that this must not be done in master/main/trunk; it should only
be done in the RC branch

> I've also tried (as hinted at in the notes for [RNG]):
>   $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -Dusername=erans
> -Dcommons.distServer=apache.releases clean deploy -Prelease
>
> where "apache.releases" is a server identifier defined in my
>   ~/.m2/settings.xml
> file, together with URL
>   https://repository.apache.org/content/repositories/staging/
> and my ASF username/password.
>
> Regards,
> Gilles
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

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



Re: [Math] "mvn commons-build:download-page" fails with Java 11

2022-12-13 Thread sebb
On Tue, 13 Dec 2022 at 12:28, Gary Gregory  wrote:
>
> You can look at how Commons Text builds, basically, JavaScript (Nashorn)
> was removed from the JRE, so you have to add a JS engine like GraalVM.

Given that all Commons components are likely to be affected by this,
it seems to me that the fix should be applied to the Commons Parent
POM, though of course it would be better if the Maven plugin could be
adjusted to fix the issue.

> Gary
>
> On Tue, Dec 13, 2022, 04:01 Alex Herbert  wrote:
>
> > On Tue, 13 Dec 2022 at 01:05, Gilles Sadowski 
> > wrote:
> > >
> > > Hello.
> > >
> > > Running
> > > $ JAVA_HOME=~/java/jdk/oracle/jdk1.8.0_333 mvn
> > commons-build:download-page
> > > [...]
> > > [INFO] BUILD SUCCESS
> > > [...]
> > >
> > > Running
> > > $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ mvn
> > commons-build:download-page
> > > [...]
> > > [ERROR] Failed to execute goal
> > > org.apache.commons:commons-build-plugin:1.12:download-page
> > > (default-cli) on project commons-math4-core: Failed to execute:
> > > Executing Ant script: generate-xdocs.build.xml [download-page]: Failed
> > > to execute.: The following error occurred while executing this line:
> > > [ERROR] /tmp/plexus-ant-component18328128830526809687.build.xml:215:
> > > Unable to create javax script engine for javascript
> > > [...]
> >
> > I did not find a solution for this when doing the latest releases. I
> > put this note in the release notes doc:
> >
> > Note: This command presently requires Java 8.
> >
> > Alex
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
> >

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



Re: [Math] Release hurdles

2022-12-13 Thread Gilles Sadowski
Le mar. 13 déc. 2022 à 17:45, sebb  a écrit :
>
> On Tue, 13 Dec 2022 at 14:09, Gilles Sadowski  wrote:
> >
> > Hello.
> >
> > I'm at the step that should upload the artefacts to the "nexus" server:
> >   $ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -Duser.name=erans
> > clean deploy -Prelease
> >
> > I get this message:
> > ---CUT---
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
> > (default-deploy) on project commons-math4-core: Failed to deploy
> > artifacts: Could not transfer artifact
> > org.apache.commons:commons-math4-core:jar:4.0-20221213.133952-543
> > from/to apache.snapshots.https
> > (https://repository.apache.org/content/repositories/snapshots):
> > Transfer failed for
> > https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-math4-core/4.0-SNAPSHOT/commons-math4-core-4.0-20221213.133952-543.jar
> > 401 Unauthorized
> > ---CUT---
> >
> > I don't remember that the "apache.snapshots.https" is the right reference
> > when "-Prelease" is set...
>
> AFAIK the Maven repo type depends on the version; if it contains
> SNAPSHOT, then it is a snapshot ...
>
> You need to ensure that the version in the pom.xml file is set to the
> desired release version.
> Note that this must not be done in master/main/trunk; it should only
> be done in the RC branch

Thanks.  I forgot to update a bunch of POM file, now that CM
is modular... :-}

Regards,
Gilles

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



Re: [Math] Release hurdles

2022-12-13 Thread Gilles Sadowski
Hello.

Next problem:
$ JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -Duser.name=erans
clean deploy -Prelease
[...]
[INFO] Reactor Summary for Apache Commons Math 4.0-beta1:
[INFO]
[INFO] Apache Commons Math  SUCCESS [ 11.845 s]
[INFO] Miscellaneous core classes . SUCCESS [ 26.164 s]
[INFO] Artificial neural networks . SUCCESS [ 20.008 s]
[INFO] Transforms . SUCCESS [ 17.360 s]
[INFO] Exception classes (Legacy) . SUCCESS [ 18.615 s]
[INFO] Miscellaneous core classes (Legacy)  SUCCESS [ 29.017 s]
[INFO] Apache Commons Math (Legacy) ... SUCCESS [01:54 min]
[INFO] Example applications ... SUCCESS [  4.542 s]
[INFO] SOFM ... SUCCESS [  4.651 s]
[INFO] SOFM: Chinese Rings  SUCCESS [ 18.144 s]
[INFO] SOFM: Traveling Salesman Problem ... SUCCESS [ 15.359 s]
[INFO] K-Means  SUCCESS [  4.529 s]
[INFO] K-Means: Image Clustering .. SUCCESS [ 16.085 s]
[INFO] Apache Commons Math (full distribution)  FAILURE [  1.303 s]
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  05:02 min
[INFO] Finished at: 2022-12-13T18:47:14+01:00
[INFO] 
[ERROR] Failed to execute goal
org.apache.commons:commons-release-plugin:1.8.0:clean-staging
(clean-staging) on project commons-math: Failed to commit files: null
[null]
[...]

I could see on the console that files are being uploaded to Nexus.
But no trace there.[1]

Regards,
Gilles

>> [...]

[1] I've just "dropped" a repository which I didn't even know was created a few
hours ago (that cannot be the result of my latest attempt at the command).

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