@Test public void testMatcher() { assertTrue(new AntArtifactMatcher("").matches(createArtifact("com.example", "test", "1.0", "jar"))); assertTrue(new AntArtifactMatcher("com.example").matches(createArtifact("com.example", "test", "1.0", "jar"))); assertFalse(new AntArtifactMatcher("at.yawk").matches(createArtifact("com.example", "test", "1.0", "jar"))); }
@Override public boolean matches(Artifact artifact) { List<String> parts = Arrays.asList( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getClassifier()); for (int i = 0; i < this.patterns.size(); i++) { if (i > parts.size()) { return false; } if (!patternMatches(patterns.get(i), parts.get(i))) { return false; } } return true; }
AntArtifactMatcher implements ArtifactMatcher { @Override public boolean matches(Artifact artifact) { List<String> parts = Arrays.asList( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getClassifier()); for (int i = 0; i < this.patterns.size(); i++) { if (i > parts.size()) { return false; } if (!patternMatches(patterns.get(i), parts.get(i))) { return false; } } return true; } }
AntArtifactMatcher implements ArtifactMatcher { @Override public boolean matches(Artifact artifact) { List<String> parts = Arrays.asList( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getClassifier()); for (int i = 0; i < this.patterns.size(); i++) { if (i > parts.size()) { return false; } if (!patternMatches(patterns.get(i), parts.get(i))) { return false; } } return true; } AntArtifactMatcher(String pattern); }
AntArtifactMatcher implements ArtifactMatcher { @Override public boolean matches(Artifact artifact) { List<String> parts = Arrays.asList( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getClassifier()); for (int i = 0; i < this.patterns.size(); i++) { if (i > parts.size()) { return false; } if (!patternMatches(patterns.get(i), parts.get(i))) { return false; } } return true; } AntArtifactMatcher(String pattern); @Override boolean matches(Artifact artifact); }
AntArtifactMatcher implements ArtifactMatcher { @Override public boolean matches(Artifact artifact) { List<String> parts = Arrays.asList( artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getClassifier()); for (int i = 0; i < this.patterns.size(); i++) { if (i > parts.size()) { return false; } if (!patternMatches(patterns.get(i), parts.get(i))) { return false; } } return true; } AntArtifactMatcher(String pattern); @Override boolean matches(Artifact artifact);  }