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

Default values for configuration, especially VersionInfo #205

Merged
merged 35 commits into from
Jan 6, 2023

Conversation

koksyn
Copy link
Contributor

@koksyn koksyn commented Dec 29, 2022

Version notes 2.3.0 - 2022-12-30

  • provides default values for plugin configuration, especially for <VersionInfo>, see Issue #98
<errTitle>${project.name}</errTitle>

<versionInfo>
  <fileVersion>${project.version} converted into a format "x.x.x.x"</fileVersion>
  <txtFileVersion>${project.version}</txtFileVersion>
  <fileDescription>${project.description}</fileDescription>
  <copyright>Copyright © ${project.inceptionYear}-${currentYear} ${project.organization.name}. All rights reserved.</copyright>
  <productName>${project.name}</productName>
  <internalName>${project.artifactId}</internalName>
  <productVersion>${project.version} converted into a format "x.x.x.x"</productVersion>
  <txtProductVersion>${project.version}</txtProductVersion>
  <companyName>${project.organization.name}</companyName>
  <trademarks>${project.organization.name}</trademarks>
  <originalFilename><!-- last path segment of the <outfile> configuration --></originalFilename>
</versionInfo>

In addition the companyName and trademarks default value proposal is a ${project.organization.name}.

  • adds a disableVersionInfoDefaults parameter to be able to disable provided defaults
  • adds documentation notes regarding a new defaults, see VERSIONINFO.md inside changed files tab.
  • new unit tests for default VersionInfo values generation was created
  • throwing exceptions with detailed description of default values formula, when cannot fulfill default values (no configuration data for formula), it helps plugin user with debugging what is wrong. Example:
    [ERROR] Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:2.3.0-SNAPSHOT:launch4j (l4j-gui) on project launch4j-demo: 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}'. -

Closes #98

@koksyn koksyn changed the title Default values for configuration, especially VersionInfo Draft: Default values for configuration, especially VersionInfo Dec 29, 2022
@koksyn koksyn changed the title Draft: Default values for configuration, especially VersionInfo Default values for configuration, especially VersionInfo Dec 30, 2022
@koksyn koksyn marked this pull request as ready for review December 30, 2022 16:19
pom.xml Outdated Show resolved Hide resolved
Copy link
Collaborator

@lukaszlenart lukaszlenart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, great tests 👏 - I left a few comments for consideration

@lukaszlenart
Copy link
Collaborator

LGTM 🎉 or rather squash&merge ;)

@lukaszlenart lukaszlenart merged commit e3949fe into orphan-oss:master Jan 6, 2023
@koksyn koksyn deleted the feature-default-params branch January 13, 2023 10:59
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

Successfully merging this pull request may close these issues.

Provide defaults, especially for version info.
2 participants