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

NullPointerException from BuildInfoRecorder in multi-module project #74

Open
odrotbohm opened this issue Jan 28, 2016 · 3 comments
Open

Comments

@odrotbohm
Copy link

I'm running the Artifactory Maven Plugin 2.4 like this: mvn deploy -Dartifactory.server=… -Dartifactory.staging-repository=… -Dartifactory.username=… -Dartifactory.password=… -Dartifactory.build-name=… -Dartifactory.build-number=… and get the following exception. Other projects just work fine.

java.lang.NullPointerException
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.getExtension(BuildInfoRecorder.java:610)
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.addDependenciesToCurrentModule(BuildInfoRecorder.java:594)
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.addFilesToCurrentModule(BuildInfoRecorder.java:460)
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeAndAddModule(BuildInfoRecorder.java:446)
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.finalizeModule(BuildInfoRecorder.java:376)
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.projectSucceeded(BuildInfoRecorder.java:196)
    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)
@eyalbe4
Copy link
Contributor

eyalbe4 commented Jan 28, 2016

@olivergierke, can you please provide a sample project that reproduces this exception so that we can debug it?

@odrotbohm
Copy link
Author

You can try this to reproduce:

$ git clone https://github.com/spring-projects/spring-data-rest
$ cd spring-data-rest
$ mvn deploy -Prelease -DskipTests -Dartifactory.server=https://repo.spring.io -Dartifactory.staging-repository=test-libs-staging-local

It fails on the root project with above mentioned NullPointerException. I have other multi-module projects that work fine so it might be something special about this one's particular setup. The Artifactory Maven plugin configuration for the working projects is the same though.

@odrotbohm
Copy link
Author

If I remove the Enforcer plugin from the root POM, the build seems to work.

odrotbohm added a commit to spring-projects/spring-data-rest that referenced this issue Jan 29, 2016
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