diff --git a/src/main/java/org/codehaus/mojo/license/AbstractLicenseNameMojo.java b/src/main/java/org/codehaus/mojo/license/AbstractLicenseNameMojo.java index 433236bed..1813493cd 100644 --- a/src/main/java/org/codehaus/mojo/license/AbstractLicenseNameMojo.java +++ b/src/main/java/org/codehaus/mojo/license/AbstractLicenseNameMojo.java @@ -114,7 +114,7 @@ public abstract class AbstractLicenseNameMojo extends AbstractLicenseMojo { * @parameter property="license.licenseName" * @since 1.0 */ - @Parameter(property = "license.licenseName") + @Parameter(property = "license.licenseName", required = true) private String licenseName; /** @@ -227,9 +227,6 @@ protected void init() throws Exception { // ---------------------------------------------------------------------- protected License getLicense(String licenseName, boolean checkIfExists) { - if (StringUtils.isEmpty(licenseName)) { - throw new IllegalArgumentException("licenseName can not be null, nor empty"); - } if (licenseStore == null) { throw new IllegalStateException("No license store initialized!"); } diff --git a/src/main/java/org/codehaus/mojo/license/model/LicenseRepository.java b/src/main/java/org/codehaus/mojo/license/model/LicenseRepository.java index 234911e0e..6ad14b00c 100644 --- a/src/main/java/org/codehaus/mojo/license/model/LicenseRepository.java +++ b/src/main/java/org/codehaus/mojo/license/model/LicenseRepository.java @@ -165,9 +165,6 @@ public License[] getLicenses() { public License getLicense(String licenseName) { checkInit("getLicense"); - if (StringUtils.isEmpty(licenseName)) { - throw new IllegalArgumentException("licenceName can not be null, nor empty"); - } License license = null; for (License l : this) {