mvn hpi:run fails with NullPointerException

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

mvn hpi:run fails with NullPointerException

Jean-Karlo Accetta
Hi all,

I am new to developing plugins for Jenkins, and I was reading several of the related pages on getting started.  The problem is that whenever I try to run any build step or goal, it fails.  I tried first with the hpi:run command they say to use for debugging, but any goal will result in the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (display-info) on project jenkins-plugins: Execution display-info of goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce failed.: NullPointerException -> [Help 1]


I'm not sure what is going on, but all my other maven projects work fine.  I'm not sure if it's an issue with maven's settings.xml or if it's an issue with the plugin's pom or something.

Any help would be appreciated, and please let me know if more information (the full log or the pom or something) would be helpful.

Thanks,
   - JK

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f03a7004-689f-4d97-a260-33caa81a0875%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: mvn hpi:run fails with NullPointerException

Carlos Sanchez
Try running mvn package hpi:run
There is a filled issue about that if you have run clean before hpi:run

On Tue, Oct 31, 2017, 21:18 Jean-Karlo Accetta <[hidden email]> wrote:
Hi all,

I am new to developing plugins for Jenkins, and I was reading several of the related pages on getting started.  The problem is that whenever I try to run any build step or goal, it fails.  I tried first with the hpi:run command they say to use for debugging, but any goal will result in the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (display-info) on project jenkins-plugins: Execution display-info of goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce failed.: NullPointerException -> [Help 1]


I'm not sure what is going on, but all my other maven projects work fine.  I'm not sure if it's an issue with maven's settings.xml or if it's an issue with the plugin's pom or something.

Any help would be appreciated, and please let me know if more information (the full log or the pom or something) would be helpful.

Thanks,
   - JK

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f03a7004-689f-4d97-a260-33caa81a0875%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALHFn6N02uR%2BmJ8O2Em4t-GBBZMK_MzHUPMV3GL%2B0YuYgqf8xA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: mvn hpi:run fails with NullPointerException

Jean-Karlo Accetta
I had tried that earlier today, but I got the same message.  I'm not sure what else to try at this point.  I even tried simply creating a project from the hello-world archetype and trying to run that without making any changes, but it also threw the same error.

On Tuesday, October 31, 2017 at 2:39:54 PM UTC-4, Carlos Sanchez wrote:
Try running mvn package hpi:run
There is a filled issue about that if you have run clean before hpi:run

On Tue, Oct 31, 2017, 21:18 Jean-Karlo Accetta <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JLA1ytw4BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jeankarl...@...> wrote:
Hi all,

I am new to developing plugins for Jenkins, and I was reading several of the related pages on getting started.  The problem is that whenever I try to run any build step or goal, it fails.  I tried first with the hpi:run command they say to use for debugging, but any goal will result in the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (display-info) on project jenkins-plugins: Execution display-info of goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce failed.: NullPointerException -> [Help 1]


I'm not sure what is going on, but all my other maven projects work fine.  I'm not sure if it's an issue with maven's settings.xml or if it's an issue with the plugin's pom or something.

Any help would be appreciated, and please let me know if more information (the full log or the pom or something) would be helpful.

Thanks,
   - JK

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="JLA1ytw4BgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/f03a7004-689f-4d97-a260-33caa81a0875%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/f03a7004-689f-4d97-a260-33caa81a0875%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/f03a7004-689f-4d97-a260-33caa81a0875%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/f03a7004-689f-4d97-a260-33caa81a0875%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/52879404-de59-40af-b4eb-988b14d20161%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: mvn hpi:run fails with NullPointerException

Jesse Glick-4
On Tue, Oct 31, 2017 at 2:47 PM, Jean-Karlo Accetta
<[hidden email]> wrote:
> I even tried simply creating a project from
> the hello-world archetype and trying to run that without making any changes,
> but it also threw the same error.

Working for me on Linux with JDK 8 and Maven 3.5.0:

mvn archetype:generate -B -DarchetypeGroupId=io.jenkins.archetypes
-DarchetypeArtifactId=empty-plugin -DarchetypeVersion=1.2
-DartifactId=test && mvn -f test -DskipTests package hpi:run

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3wQ23G9FT5BYT0APOQup%2BYaZhB-7rkzbmQMssXjAL8Ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: mvn hpi:run fails with NullPointerException

Jean-Karlo Accetta
Thanks Jesse.  I just now tried on Linux and it worked there just fine!

The error happens on my Mac (Sierra 10.12.3), also with JDK 8 and Maven 3.5.0.  I'm not really sure why it would fail on Mac, but that still helps! I can work on a Linux machine, instead.

On Wednesday, November 1, 2017 at 7:27:33 AM UTC-4, Jesse Glick wrote:
On Tue, Oct 31, 2017 at 2:47 PM, Jean-Karlo Accetta
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="kR1JQ-zRBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jeankarl...@...> wrote:
> I even tried simply creating a project from
> the hello-world archetype and trying to run that without making any changes,
> but it also threw the same error.

Working for me on Linux with JDK 8 and Maven 3.5.0:

mvn archetype:generate -B -DarchetypeGroupId=io.jenkins.archetypes
-DarchetypeArtifactId=empty-plugin -DarchetypeVersion=1.2
-DartifactId=test && mvn -f test -DskipTests package hpi:run

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/aac5eb4f-1d29-47ff-87e6-b00a83a2d069%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: mvn hpi:run fails with NullPointerException

Jesse Glick-4
On Wed, Nov 1, 2017 at 11:05 AM, Jean-Karlo Accetta
<[hidden email]> wrote:
> I'm not really sure why it would fail on Mac

No idea offhand. Generally the behavior of things like this is very
similar on Linux and Mac OS X (whereas Windows behavior tends to
diverge a lot). The only common difference is the case-insensitive
filesystem.

If you run with the `-e` option you will see a full stack trace, which
would allow diagnosis if you refer to mojo source code. Requires some
familiarity with Maven to make progress that way.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3mnNkYM2cvCf2YwA52yVwaHC6Mj3NhTb9TfUxzfDCCOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.