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

Exclude by wildcard and a stacktrace #13

Open
jzonthemtn opened this issue Dec 20, 2015 · 2 comments
Open

Exclude by wildcard and a stacktrace #13

jzonthemtn opened this issue Dec 20, 2015 · 2 comments

Comments

@jzonthemtn
Copy link

First, thanks for this project.

Second, a feature request: Would it be possible to exclude based on the groupId only, such as specifying org.apache:: as an exclude param?

And lastly, I get this stack trace during execution:

[ERROR] Failed to execute goal org.complykit:license-check-maven-plugin:0.5.3:os-check (default) on project entitydb-core: Execution default of goal org.complykit:license-check-maven-plugin:0.5.3:os-check failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.complykit:license-check-maven-plugin:0.5.3:os-check (default) on project entitydb-core: Execution default of goal org.complykit:license-check-maven-plugin:0.5.3:os-check failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        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:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        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:483)
        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)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.complykit:license-check-maven-plugin:0.5.3:os-check failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.NullPointerException
        at org.complykit.licensecheck.mojo.OpenSourceLicenseCheckMojo.readPomContents(OpenSourceLicenseCheckMojo.java:301)
        at org.complykit.licensecheck.mojo.OpenSourceLicenseCheckMojo.recurseForLicenseName(OpenSourceLicenseCheckMojo.java:255)
        at org.complykit.licensecheck.mojo.OpenSourceLicenseCheckMojo.execute(OpenSourceLicenseCheckMojo.java:175)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        ... 20 more

If you have any ideas let me know. Thanks!

@mrice
Copy link
Owner

mrice commented Dec 22, 2015

Ugh. NPE. Thanks so much for taking the time to open the issue. Can you attach the pom you're trying to parse or email it to me (me@michaelrice.com)?

@jzonthemtn
Copy link
Author

Unfortunately I cannot and sorry for being so slow to respond. But I did clone your code and I put in some sysouts where you have TODOs in the exception handlers in OpenSourceLicenseCheckMojo. The problem is the pom.xml is not found. (The exception handler on line 287 let me know.) This is not the real path but it is identical in terms of length:

/full/path/to/project/parent-pom/child-pom/child-pom/target/project.pom

I hope that makes at least a little bit of sense. What caught my eye is that it is looking in the project's target directory for the pom.xml. Is that correct? I am running mvn clean install.

Hope this is helpful and let me know if you need me to dig some more.

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