-
Notifications
You must be signed in to change notification settings - Fork 27
Maven plugin, empty global variable value provided in POM throws NPE #47
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
Comments
map with global vars contains null as variable value for empty string so it is bug that the preprocessor gets NPE, I will fix and just will not be adding the variable (with log) and unknownVarAsFalse will be working |
I have made fix for NPE so that now it should ignore such empty variable (with log message) and flag unknownVarAsFalse will be working, you can try snapshot version |
Thanks,
plus source:
works just like it should |
If there are no problems with it, could you release it as 7.1.1? |
7.1.1 is out |
Could you please add an option to ignore (treat as empty string?) variables that are set to empty or undeclared properties?
Here's an example:
I have plugin
Which sets properties including "${git.build.time}"
I have your plugin with
Which is then used in the source like that
Everything works as intended
Now try to change it to
or
Both result in error:
Failed to execute goal com.igormaznitsa:jcp:7.1.0:preprocess (preprocess-sources) on project lbnet-maven-plugins-launch4j-wrp: Parameter is null -> [Help 1]
I tried < unknownVarAsFalse > true < /unknownVarAsFalse > but apparently it doesn't affect var declarations in pom, only var usage in sources.
Could you please add an option to handle that? " < allowEmptyVarDeclarations > " or something, to have them resolve to empty strings "" instead of throwing an error at buildtime?
p.s. Have I mentioned I really appreciate your work? I never understood why Java devs decided preprocessing is unnecessary.
The text was updated successfully, but these errors were encountered: