diff options
Diffstat (limited to 'enforcer-rule/src/main/java/org/semver')
-rw-r--r-- | enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java b/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java index 0fd0b36..5346e18 100644 --- a/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java +++ b/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java @@ -53,6 +53,7 @@ import org.semver.Version; public abstract class AbstractEnforcerRule implements EnforcerRule { private static final String SNAPSHOT_VERSION_SUFFIX = "-SNAPSHOT"; + private static final String JAR_ARTIFACT_TYPE = "jar"; /** * Version number of artifact to be checked. @@ -98,8 +99,8 @@ public abstract class AbstractEnforcerRule implements EnforcerRule { throw new EnforcerRuleException("Failed to access ${project} variable", e); } final String type = project.getArtifact().getType(); - if (!"jar".equals(type)) { - throw new IllegalArgumentException("Only support 'jar' as artifact type"); + if (!JAR_ARTIFACT_TYPE.equals(type)) { + throw new IllegalArgumentException("Only support '"+JAR_ARTIFACT_TYPE+"' as artifact type"); } final Artifact previousArtifact; |