orphan-oss/launch4j-maven-plugin

Build fails when project.description is not defined

mayerrobert opened this issue · 2 comments

My project was using launch4j-maven-plugin from 2.2.0 and the launch4j config was given in an external file (configuration->infile). project.description was not specified in any of my poms and was not needed. You may see where this is going :-)

After upgrading to 2.3.0 my build failed with

Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:2.3.0:launch4j (l4j-clui) on project scripts: Cannot fill out VersionInfo by defaults: Please fill the missing configuration values. Error when trying to fulfill default value for VersionInfo parameter:'fileDescription' with formula params:'${project.description}'.

I was able to "fix" this "error" by adding a dscription to my toplevel pom which is a good idea anyways. But I think launch4j-maven-plugin should not fail if it was unable to set a default value that (at least in my case) turns out not to be needed in the end (maybe default to "unspecified" or "no description" or something?)

Feel free to ignore/ wontfix/ close this issue, I don't "need" a fix, I just thought you guys might want to know an observation I made.

Cheers!

@koksyn what do you think about this?

Thanks for reporting this issue and your observations ;) ! I think it is a good idea to introduce warnings instead of exceptions.

The main idea of defaults in version 2.3.0. was to make life easier for the library user who just wants to generate an executable file without worrying about the Metadata that is filled in there (which may not be relevant to him).
The default values were taken, among other things, from the general properties of the POM project configuration. Only if there is nothing to fill in the defaults with was an exception thrown.

Nevertheless, such a situation still requires additional actions from the user like filling in project.description etc.

Soon, I will introduce changes that will fill in the missing properties with dummy data and only warn about it in the logs, so that the user is aware of what happened, without preventing him from building the executable.