-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Provide defaults, especially for version info. #98
Comments
I'm not a fan of defaults, magic doesn't help. Anyway I would suggest preparing a PR with your ideas, then we can discuss further. Also please notice that |
There's no magic in saying that the description of the generated
Wonderful. They can both be popular. That doesn't change that fact that in Maven the appropriate format of a non-release version is But forget the version manipulation if you don't like it and/or don't think it's appropriate. I provided a lot of options for you to choose from. Are you such an enemy of defaults that you think defaulting the product name to match the project name is helping the user too much? (Yes, I know that sometimes the "project" is different than the "product", but the point of a default is to give a value that works for most people and still allows the outliers to use the value they want, which they would have had to do anyway without the default.) People just wanting to generate an
Unfortunately I'm extremely busy and won't have time to submit a pull request. I already invested a significant amount of time in presenting and describing the options in an understandable way. I was hoping to help your project and other users of your project. I've already integrated these defaults into our POMs. If you don't find it useful, feel free not to use it. Good luck, Garret |
P.S. And another sincere thanks for publishing this project. |
* Fix: Escape angle brackets in Markdown documentation to be printed out. GitHub uses one of many kinds of Markdown syntaxes. In this one it does not display plain text inside angle brackets (like <any text>) in the headers, so we need to escape them. For details, please see the issue: microsoft/vscode#12491 * `disableVersionInfoDefaults` docs note added * Snapshot version bump according to default parameters changes * New parameter for disabling VersionInfo defaults * Filling out VersionInfo defaults * Filling out VersionInfo defaults * Unit tests for Copyright generator * Copyright generator description * JUnitParams lib added to POM.xml * Unit tests for Launch4j fileVersion generator * Additional Unit tests for Launch4j fileVersion generator * Refactoring of Launch4j fileVersion generator * "errTitle" default value provided * "errTitle" default value in docs * "versionInfo -> originalFilename" default value added * release version notes Resolves #98 * Line added to MOJO doc * trademarks & companyName also filled by defaults * Mockito Core library added * VersionInfo refactoring * VersionInfo unit tests * Adds missing VersionInfo unit tests * Adds missing Mojo param to MojoTest * Refactoring MojoTest * Missing dependency added to POM * Possibility of not filling out VersionInfo in XML at all * Documentation for VersionInfo defaults added * Throwing exception datailed descriptions * Release version without snapshot * Revert "Release version without snapshot" This reverts commit d019663. * default scope for filling out defaults inside VersionInfo * Newline's at the end of the files * Private constructors for utility classes added
After several years of intending to try Launch4j, I've finally got around to testing it with your Maven plugin. I've just got things working, and your Maven plugin so far seems to make the process really snazzy.
In the spirit of Maven (and many of its plugins), which provides reasonable defaults for many properties, I'd like to propose that you provide reasonable defaults. For example for
<errTitle>
you could default toBut most importantly defaults for
<versionInfo>
would really help. After a bit of experimentation, let me suggest the following. (You may be able to improve upon these.)Versions
Note that Launch4j seems to require a version in the format
x.x.x.x
, so we can't just use${project.version}
(although we can use that for the text variations). So we have to take the base Maven project version and add an.0
to it. One can get the base version number using the following. (I'm sure your plugin can determine the whole thing programmatically internally without the need for an extra plugin.)Note that this will only work if the project version has the format
x.x.x
with optional-SNAPSHOT
. If the project version has fewer or more components, the final number of components won't be correct. But if you set this programmatically in the plugin, then none of this matters; you can ensure the correct number of components when building the default string, and won't even need this extra plugin in the POM.Copyright
The copyright message was inspired by the Maven Javadoc Plugin, which uses a bottom copyright message of:
There is no real need to escape the
©
symbol. Note that the en dash symbol–
doesn't show up well (at least on Windows 10 in the properties dialog details tab), so I (sadly) switched to using a normal dash-
symbol. I also had to update the other properties to use the latest Maven convention. And lastly in order to get${build.year}
you'll need to set that property. You can do this with a separate plugin, but again, this is something you can undoubtedly do programmatically within your own plugin.Original Filename
For the
<originalFilename>
, you should just use the last path segment of the<outfile>
configuration as the default value. Because after all, since that is the name of the file you are generating, that could reasonably be said to be the original filename. 😄The text was updated successfully, but these errors were encountered: