Skip to content

Commit

Permalink
feat(maven): Support additional properties in release auto-config. Re…
Browse files Browse the repository at this point in the history
…lates to #937
  • Loading branch information
McPringle authored and aalmiray committed Oct 27, 2022
1 parent f13f1f8 commit e1342d3
Showing 1 changed file with 38 additions and 0 deletions.
Expand Up @@ -104,6 +104,26 @@ public class JReleaserAutoConfigReleaseMojo extends AbstractMojo {
*/
@Parameter(property = "jreleaser.project.snapshot.full.changelog")
boolean projectSnapshotFullChangelog;
/**
* The project copyright information.
*/
@Parameter(property = "jreleaser.project.copyright")
private String projectCopyright;
/**
* The project description.
*/
@Parameter(property = "jreleaser.project.description")
private String projectDescription;
/**
* The year of project inception.
*/
@Parameter(property = "jreleaser.project.inceptionYear")
private String projectInceptionYear;
/**
* The stereotype of the project.
*/
@Parameter(property = "jreleaser.project.stereotype")
private String projectStereotype;
/**
* The release tag.
*/
Expand Down Expand Up @@ -204,6 +224,11 @@ public class JReleaserAutoConfigReleaseMojo extends AbstractMojo {
*/
@Parameter(property = "jreleaser.armored")
private boolean armored;
/**
* The authors.
*/
@Parameter(property = "jreleaser.authors")
private String[] authors;
/**
* Input file(s) to be uploaded.
*/
Expand Down Expand Up @@ -241,6 +266,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
.projectSnapshotPattern(projectSnapshotPattern)
.projectSnapshotLabel(projectSnapshotLabel)
.projectSnapshotFullChangelog(projectSnapshotFullChangelog)
.projectCopyright(projectCopyright)
.projectDescription(projectDescription)
.projectInceptionYear(projectInceptionYear)
.projectStereotype(projectStereotype)
.tagName(tagName)
.previousTagName(previousTagName)
.releaseName(releaseName)
Expand All @@ -261,6 +290,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
.commitAuthorEmail(commitAuthorEmail)
.signing(signing)
.armored(armored)
.authors(collectAuthors())
.files(collectFiles())
.globs(collectGlobs())
.selectedPlatforms(collectSelectedPlatforms())
Expand All @@ -283,6 +313,14 @@ private PrintWriter createTracer() throws MojoExecutionException {
}
}

private List<String> collectAuthors() {
List<String> list = new ArrayList<>();
if (authors != null && authors.length > 0) {
Collections.addAll(list, authors);
}
return list;
}

private List<String> collectFiles() {
List<String> list = new ArrayList<>();
if (files != null && files.length > 0) {
Expand Down

0 comments on commit e1342d3

Please sign in to comment.