From b2f4fa401dda9139eafd69bf35d4a9c39a4cee8e Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Thu, 15 Mar 2012 15:32:51 -0300 Subject: Do not throw exception when no previous artifacts exist. --- .../src/main/java/org/semver/enforcer/AbstractEnforcerRule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'enforcer-rule/src/main/java/org/semver') 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 4f5a6f6..4eae532 100755 --- a/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java +++ b/enforcer-rule/src/main/java/org/semver/enforcer/AbstractEnforcerRule.java @@ -135,7 +135,9 @@ public abstract class AbstractEnforcerRule implements EnforcerRule { validateArtifact(previousArtifact); validateArtifact(currentArtifact); } catch (Exception e) { - throw new EnforcerRuleException("Exception while accessing artifacts", e); + helper.getLog().warn("Exception while accessing artifacts; skipping check.", e); + return; + //throw new EnforcerRuleException("Exception while accessing artifacts", e); } final Version previous = Version.parse(previousArtifact.getVersion()); -- cgit v1.2.3