diff options
author | Julien Eluard <[email protected]> | 2010-12-06 09:10:29 +0100 |
---|---|---|
committer | Julien Eluard <[email protected]> | 2010-12-06 09:10:29 +0100 |
commit | 00bbe48e562fffe1264fb708dc9878f839ee9a45 (patch) | |
tree | 5378448a830f73c3fc4f04a8aa5e06900c870982 /enforcer-rule | |
parent | 94f32c8a533a4649ff215dadec447ce1ccf1fe8b (diff) |
Refactoring.
Diffstat (limited to 'enforcer-rule')
-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; |