diff options
author | Prasanth Pallamreddy <[email protected]> | 2014-03-23 22:18:18 -0700 |
---|---|---|
committer | Prasanth Pallamreddy <[email protected]> | 2014-03-23 22:18:18 -0700 |
commit | f2bcacf736cd487b335f50736de74f6c37b22ef4 (patch) | |
tree | e4136d34fd90489f20cce8045e92638df9d60e86 /enforcer-rule | |
parent | 614b124cac36f792eb934047231a3ac1ad2f13eb (diff) |
Issue #23 - Support bundle artifact type
Diffstat (limited to 'enforcer-rule')
-rwxr-xr-x | enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java | 7 |
1 files changed, 5 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 dd10c44..91356e9 100755 --- a/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java +++ b/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java @@ -50,6 +50,7 @@ import org.semver.Version; public abstract class AbstractEnforcerRule implements EnforcerRule { private static final String JAR_ARTIFACT_TYPE = "jar"; + private static final String BUNDLE_ARTIFACT_TYPE = "bundle"; /** * Version number of artifact to be checked. @@ -95,8 +96,10 @@ public abstract class AbstractEnforcerRule implements EnforcerRule { throw new EnforcerRuleException("Failed to access ${project} variable", e); } final String type = project.getArtifact().getType(); - if (!AbstractEnforcerRule.JAR_ARTIFACT_TYPE.equals(type)) { - helper.getLog().debug("Skipping non "+AbstractEnforcerRule.JAR_ARTIFACT_TYPE+" artifact."); + if (!AbstractEnforcerRule.JAR_ARTIFACT_TYPE.equals(type) && + !AbstractEnforcerRule.BUNDLE_ARTIFACT_TYPE.equals(type)) { + helper.getLog().debug("Skipping non "+AbstractEnforcerRule.JAR_ARTIFACT_TYPE+ + " or " + BUNDLE_ARTIFACT_TYPE + " artifact."); return; } |