Skip to content

Commit

Permalink
refactor(core): Project copyright is required by assemblers. Relates to
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Aug 29, 2022
1 parent 26aa26b commit 8ee1360
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -158,6 +158,17 @@ public static void postValidateProject(JReleaserContext context, JReleaserContex
if (isBlank(project.getDescription())) {
errors.configuration(RB.$("validation_must_not_be_blank", "project.description"));
}

if (isBlank(project.getCopyright())) {
if (project.getInceptionYear() != null &&
!project.getAuthors().isEmpty()) {
project.setCopyright(
project.getInceptionYear() + " " +
String.join(", ", project.getAuthors()));
} else {
errors.configuration(RB.$("validation_must_not_be_blank", "project.copyright"));
}
}
}

if (!mode.validateConfig() && !mode.validateAnnounce()) {
Expand Down

0 comments on commit 8ee1360

Please sign in to comment.