fix(core): Validate project.java.groupId is not null when Nexus2 is active. Fixes
*/
package org.jreleaser.model.internal.validation.deploy.maven;
+import org.jreleaser.bundle.RB;
import org.jreleaser.model.api.JReleaserContext.Mode;
import org.jreleaser.model.internal.JReleaserContext;
import org.jreleaser.model.internal.deploy.maven.Nexus2MavenDeployer;
@@ -28,6 +29,7 @@ import java.util.Locale;
import java.util.Map;
import static org.jreleaser.model.internal.validation.deploy.maven.MavenDeployersValidator.validateMavenDeployer;
+import static org.jreleaser.util.StringUtils.isBlank;
import static org.jreleaser.util.StringUtils.isNotBlank;
/**
@@ -75,5 +77,9 @@ public abstract class Nexus2MavenDeployerValidator extends Validator {
errors));
}
+
+ if (isBlank(context.getModel().getProject().getJava().getGroupId())) {
+ errors.configuration(RB.$("validation_must_not_be_blank", "project.java.groupId"));
+ }
}
}
