You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Eric Barnhill <er...@gmail.com> on 2019/03/04 22:21:11 UTC

[numbers-fraction] Maven surefire plugin error

I am getting a maven error for the surefire plugin, but don't see it listed
as a dependency in numbers-fraction or numbers-core. I see it listed in
numbers-parent, but with no version number. Any ideas what I need to do to
get the tests running again?

I also get this error with other numbers modules so I suspect it is down to
my setup, but just can't quite see what to modify. "It was all working last
week..."

Error msg:
---
Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test)
on project commons-numbers-fraction: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
NullPointerException -> [Help 1]

Re: [numbers-fraction] Maven surefire plugin error

Posted by Alex Herbert <al...@gmail.com>.
I just did a fresh clone of commons-numbers and it runs ‘mvn test’ ok.

Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T20:39:06+01:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.3", arch: "x86_64", family: “mac"


The output listed maven-surefire-plugin:2.22.0

Your 2.20.1 version may indicate something is out of sync somewhere.

The effective pom view in eclipse has both versions in properties:

<surefire.version>2.20.1</surefire.version>
<commons.surefire.version>2.22.0</commons.surefire.version>

PluginManagement has:

<plugin>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.22.0</version>
</plugin>

This seems to be coming from commons-parent 47.

Try a fresh clone and build. Or are you on a branch other than master?


> On 4 Mar 2019, at 22:21, Eric Barnhill <er...@gmail.com> wrote:
> 
> I am getting a maven error for the surefire plugin, but don't see it listed
> as a dependency in numbers-fraction or numbers-core. I see it listed in
> numbers-parent, but with no version number. Any ideas what I need to do to
> get the tests running again?
> 
> I also get this error with other numbers modules so I suspect it is down to
> my setup, but just can't quite see what to modify. "It was all working last
> week..."
> 
> Error msg:
> ---
> Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test)
> on project commons-numbers-fraction: Execution default-test of goal
> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
> NullPointerException -> [Help 1]


Re: [numbers-fraction] Maven surefire plugin error

Posted by Eric Barnhill <er...@gmail.com>.
Rebasing on master fixed the problem, thank you.

On Mon, Mar 4, 2019 at 3:39 PM Gilles Sadowski <gi...@gmail.com> wrote:

>
>
> I'd recommend that you regularly rebase from "master".
>
> Regards,
> Gilles
>
> >
> > > Here is an excerpt of the exception trace (from running "mvn -e test"):
> > > ---CUT---
> > > Caused by: java.lang.NullPointerException
> > >    at
> org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast
> > > (SystemUtils.java:1626)
> > >    at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm
> > > (AbstractSurefireMojo.java:2107)
> > >    at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguration
> > > (AbstractSurefireMojo.java:1976)
> > >    at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider
> > > (AbstractSurefireMojo.java:1111)
> > >    at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked
> > > (AbstractSurefireMojo.java:954)
> > > ---CUT---
> > >
> > > Regards,
> > > Gilles
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [numbers-fraction] Maven surefire plugin error

Posted by Gilles Sadowski <gi...@gmail.com>.
Le mar. 5 mars 2019 à 00:29, Alex Herbert <al...@gmail.com> a écrit :
>
>
> > On 4 Mar 2019, at 23:10, Gilles Sadowski <gi...@gmail.com> wrote:
> >
> > Hi.
> >
> > Le lun. 4 mars 2019 à 23:21, Eric Barnhill <er...@gmail.com> a écrit :
> >>
> >> I am getting a maven error for the surefire plugin, but don't see it listed
> >> as a dependency in numbers-fraction or numbers-core. I see it listed in
> >> numbers-parent, but with no version number. Any ideas what I need to do to
> >> get the tests running again?
> >
> > Version is probably inherited from CP (commons-parent).
> >
> >>
> >> I also get this error with other numbers modules so I suspect it is down to
> >> my setup, but just can't quite see what to modify. "It was all working last
> >> week..."
> >
> > Did you change the environment (IDE, JVM, maven)?
> >
> >> Error msg:
> >> ---
> >> Failed to execute goal
> >> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test)
> >> on project commons-numbers-fraction: Execution default-test of goal
> >> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
> >> NullPointerException -> [Help 1]
> >
> > This does not occur on "master" but only on the "fraction-dev" branch.
>
> I tried the ‘fraction-dev’ branch. My build from the root reactor gets past the [numbers-fraction] module but fails on [numbers-arrays] with a compilation failure.
>
> Since it is possibly a platform issue I'll try open JDK on linux tomorrow for comparison.
>
> You could try updating the branch to commons-parent 47 as a test.

I'd recommend that you regularly rebase from "master".

Regards,
Gilles

>
> > Here is an excerpt of the exception trace (from running "mvn -e test"):
> > ---CUT---
> > Caused by: java.lang.NullPointerException
> >    at org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast
> > (SystemUtils.java:1626)
> >    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm
> > (AbstractSurefireMojo.java:2107)
> >    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguration
> > (AbstractSurefireMojo.java:1976)
> >    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider
> > (AbstractSurefireMojo.java:1111)
> >    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked
> > (AbstractSurefireMojo.java:954)
> > ---CUT---
> >
> > Regards,
> > Gilles
> >

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


Re: [numbers-fraction] Maven surefire plugin error

Posted by Alex Herbert <al...@gmail.com>.
> On 4 Mar 2019, at 23:10, Gilles Sadowski <gi...@gmail.com> wrote:
> 
> Hi.
> 
> Le lun. 4 mars 2019 à 23:21, Eric Barnhill <er...@gmail.com> a écrit :
>> 
>> I am getting a maven error for the surefire plugin, but don't see it listed
>> as a dependency in numbers-fraction or numbers-core. I see it listed in
>> numbers-parent, but with no version number. Any ideas what I need to do to
>> get the tests running again?
> 
> Version is probably inherited from CP (commons-parent).
> 
>> 
>> I also get this error with other numbers modules so I suspect it is down to
>> my setup, but just can't quite see what to modify. "It was all working last
>> week..."
> 
> Did you change the environment (IDE, JVM, maven)?
> 
>> Error msg:
>> ---
>> Failed to execute goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test)
>> on project commons-numbers-fraction: Execution default-test of goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
>> NullPointerException -> [Help 1]
> 
> This does not occur on "master" but only on the "fraction-dev" branch.

I tried the ‘fraction-dev’ branch. My build from the root reactor gets past the [numbers-fraction] module but fails on [numbers-arrays] with a compilation failure.

Since it is possibly a platform issue I'll try open JDK on linux tomorrow for comparison.

You could try updating the branch to commons-parent 47 as a test.

> Here is an excerpt of the exception trace (from running "mvn -e test"):
> ---CUT---
> Caused by: java.lang.NullPointerException
>    at org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast
> (SystemUtils.java:1626)
>    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm
> (AbstractSurefireMojo.java:2107)
>    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguration
> (AbstractSurefireMojo.java:1976)
>    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider
> (AbstractSurefireMojo.java:1111)
>    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked
> (AbstractSurefireMojo.java:954)
> ---CUT---
> 
> Regards,
> Gilles
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


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


Re: [numbers-fraction] Maven surefire plugin error

Posted by Gilles Sadowski <gi...@gmail.com>.
Hi.

Le lun. 4 mars 2019 à 23:21, Eric Barnhill <er...@gmail.com> a écrit :
>
> I am getting a maven error for the surefire plugin, but don't see it listed
> as a dependency in numbers-fraction or numbers-core. I see it listed in
> numbers-parent, but with no version number. Any ideas what I need to do to
> get the tests running again?

Version is probably inherited from CP (commons-parent).

>
> I also get this error with other numbers modules so I suspect it is down to
> my setup, but just can't quite see what to modify. "It was all working last
> week..."

Did you change the environment (IDE, JVM, maven)?

> Error msg:
> ---
> Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test)
> on project commons-numbers-fraction: Execution default-test of goal
> org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
> NullPointerException -> [Help 1]

This does not occur on "master" but only on the "fraction-dev" branch.
Here is an excerpt of the exception trace (from running "mvn -e test"):
---CUT---
Caused by: java.lang.NullPointerException
    at org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast
(SystemUtils.java:1626)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getEffectiveJvm
(AbstractSurefireMojo.java:2107)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguration
(AbstractSurefireMojo.java:1976)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider
(AbstractSurefireMojo.java:1111)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked
(AbstractSurefireMojo.java:954)
---CUT---

Regards,
Gilles

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