public static Exclusion asExclusion(MavenDependencyExclusion coordinates) { String group = coordinates.getGroupId(); String artifact = coordinates.getArtifactId(); group = (group == null || group.length() == 0) ? "*" : group; artifact = (artifact == null || artifact.length() == 0) ? "*" : artifact; return new Exclusion(group, artifact, "*", "*"); }
public static Exclusion asExclusion(MavenDependencyExclusion coordinates) { String group = coordinates.getGroupId(); String artifact = coordinates.getArtifactId(); group = (group == null || group.length() == 0) ? "*" : group; artifact = (artifact == null || artifact.length() == 0) ? "*" : artifact; return new Exclusion(group, artifact, "*", "*"); }
@Test public void properties() { final String groupId = "groupId"; final String artifactId = "artifactId"; final MavenDependencyExclusion exclusion = new MavenDependencyExclusionImpl(groupId, artifactId); Assert.assertEquals(groupId, exclusion.getGroupId()); Assert.assertEquals(artifactId, exclusion.getArtifactId()); Assert.assertEquals(groupId + ":" + artifactId, exclusion.toCanonicalForm()); }