Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when calling scm:checkin goal #125

Open
akhettar-zz opened this issue Jul 12, 2017 · 1 comment
Open

NPE when calling scm:checkin goal #125

akhettar-zz opened this issue Jul 12, 2017 · 1 comment

Comments

@akhettar-zz
Copy link

akhettar-zz commented Jul 12, 2017

Hi

I am getting NPE when running scm:checkin - see snippet of my jenkins pipeline set up. Any help would be reallly appreciated.

def artifactoryServer = Artifactory.newServer url: 'http://***, username: 'tfjenkins', password: ''
def artifactoryMaven = Artifactory.newMavenBuild()
def gitUrl=basegitURL+"/"+component_name
artifactoryMaven.tool = 'maven3' // Tool name from Jenkins configuration

artifactoryMaven.deployer releaseRepo: releaseRepo, snapshotRepo: snapshotRepo, server: artifactoryServer

artifactoryMaven.opts = '-Xmx2048m'

Maven run

artifactoryMaven.run pom: 'pom.xml', goals: '-X -s configuration/settings.xml build-helper:released-version verify versions:set -DnewVersion=${releasedVersion.version} -DskipTests=true versions:commit'

<artifactoryMaven.run pom: 'pom.xml', goals: 'clean install -DskipTests=${skipTests} -s configuration/settings.xml'>

<artifactoryMaven.run pom: 'pom.xml', goals: '-X -s configuration/settings.xml build-helper:released-version scm:tag -Dtag=${releasedVersion.version} -DskipTests=${skipTests}'>

<artifactoryMaven.run pom: 'pom.xml', goals: '-X scm:checkin -Dmessage="Updated to next release version ansible job" -s configuration/settings.xml'>

Stack trace

[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 10.460 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2017-07-12T15:09:09+00:00
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 20M/580M
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - NullPointerException
java.lang.NullPointerException
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addArtifactsToCurrentModule(BuildInfoRecorder.java:540)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.addFilesToCurrentModule(BuildInfoRecorder.java:485)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeAndAddModule(BuildInfoRecorder.java:472)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeModule(BuildInfoRecorder.java:398)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.projectSucceeded(BuildInfoRecorder.java:214)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:74)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:126)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[main] ERROR org.apache.maven.cli.MavenCli -

@yahavi
Copy link
Member

yahavi commented Jul 13, 2017

@akhettar,
We fixed the issue. Here is the link to the commit: baae391
Here is a download link for a snapshot version which includes the fix:
https://oss.jfrog.org/oss-snapshot-local/org/jenkins-ci/plugins/artifactory/2.12.2-SNAPSHOT/artifactory-2.12.2-20170713.063853-5.hpi

We would appreciate your feedback for it.

RobiNino pushed a commit to RobiNino/build-info that referenced this issue Oct 7, 2020
Additional Docker and Gradle examples for the GitLab CI examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants