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 when setting "addedToClassPath=true" without specifying output directory #41

Closed
fbilhautcmx opened this issue Feb 20, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@fbilhautcmx
Copy link

Caused by: java.lang.NullPointerException at org.codehaus.mojo.xml.TransformMojo.addToClasspath(TransformMojo.java:253) at org.codehaus.mojo.xml.TransformMojo.transform(TransformMojo.java:569) at org.codehaus.mojo.xml.TransformMojo.execute(TransformMojo.java:632) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 21 more

@rosslamont
Copy link
Contributor

I'm not super familiar with the transform goal, but I'll have a go at it.

Can I assume you explicitly set the output directory to null? It's supposed to default if not supplied.

If so, should this fail as a configuration error?

@fbilhautcmx
Copy link
Author

fbilhautcmx commented Feb 24, 2018 via email

@jochenw
Copy link
Member

jochenw commented Feb 26, 2018 via email

@rosslamont
Copy link
Contributor

And, how would one do that, because Maven is handling the default values?

<outputDir></outputDir>

Presumably by mistake.

Sounds like the defaulting isn't working for some reason.

@rosslamont
Copy link
Contributor

In a comment on issue #40 jochenw said:

Otoh, if the default is actually ignored when using something like

<outputDir/>

then I'd definitely suggest that you file a Maven issue, because that is
clearly in violation of the plugin contract.

If a developer explicitly sets something to null, then surely this should override the default? In this particular case that would be an error so I'm not in a great rush to do anything about it.

rosslamont added a commit that referenced this issue Feb 28, 2018
Fixed #41. "addedToClassPath" setting not using proper outputDir default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants