Skip to content

Commit

Permalink
Fix an accidental rename.
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Nov 23, 2024
1 parent c54978c commit e09daf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,16 @@
</FormalItem>
</Subsection>

<Subsection title="packageVersion">
<Subsection title="version">
<Paragraph>
The <Term type="element">packageVersion</Term> element specifies version information. It must have a <Term type="element">
The <Term type="element">version</Term> element specifies version information. It must have a <Term type="element">
number
</Term> child element whose text content is the full semantic version of the application, and a <Term type="element">
date
</Term> child element that indicates when the version number was set.
</Paragraph>
<Paragraph>
If no <Term type="element">packageVersion</Term> element is specified, the
If no <Term type="element">version</Term> element is specified, the
<Term type="element">number</Term>
child element is set to the value of the Maven POM's
<Term type="element">version</Term>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public final class MPackageMojo extends AbstractMojo
*/

@Parameter(required = false)
private Version packageVersion;
private Version version;

/**
* The main module.
Expand Down Expand Up @@ -633,17 +633,17 @@ private void setVersion(
final MMetadata.Builder metaBuilder)
throws VersionException
{
if (this.packageVersion == null) {
if (this.version == null) {
LOG.warn("No package version was set: Defaulting date to 2024-01-01.");
this.packageVersion = new Version();
this.packageVersion.setDate("2024-01-01");
this.packageVersion.setNumber(this.project.getVersion());
this.version = new Version();
this.version.setDate("2024-01-01");
this.version.setNumber(this.project.getVersion());
}

metaBuilder.setVersion(
new MVersion(
VersionParser.parse(this.packageVersion.getNumber()),
LocalDate.parse(this.packageVersion.getDate())
VersionParser.parse(this.version.getNumber()),
LocalDate.parse(this.version.getDate())
)
);
}
Expand Down

0 comments on commit e09daf3

Please sign in to comment.