private Artifact getArtifact(String coordinate) { DefaultArtifact versionedArtifact; try { // this will throw an exception if no version is specified versionedArtifact = new DefaultArtifact(coordinate); } catch (IllegalArgumentException e) { // try appending the default version so we can specify artifacts without versions if (defaultVersion != null) { versionedArtifact = new DefaultArtifact(coordinate + ":" + defaultVersion); } else { throw e; } } return versionedArtifact; }
public String getVersion() { if ( version != null ) { return version; } else { return artifact.getVersion(); } }
public String getGroupId() { if ( groupId != null ) { return groupId; } else { return artifact.getGroupId(); } }
public static Artifact toPomArtifact( Artifact artifact ) { Artifact pomArtifact = artifact; if ( pomArtifact.getClassifier().length() > 0 || !"pom".equals( pomArtifact.getExtension() ) ) { pomArtifact = new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(), "pom", artifact.getVersion() ); } return pomArtifact; }
public static Object getKey( Artifact artifact ) { return artifact.getGroupId() + ':' + artifact.getArtifactId() + ':' + artifact.getBaseVersion(); }
public static Object getKey( Artifact artifact ) { return artifact.getGroupId() + ':' + artifact.getArtifactId(); }
public File getFile() { return artifact.getFile(); }
public String getArtifactId() { if ( artifactId != null ) { return artifactId; } else { return artifact.getArtifactId(); } }
public String getExtension() { return artifact.getExtension(); }
public String getClassifier() { return artifact.getClassifier(); }
public String getVersion() { return artifact.getBaseVersion(); }
public Nature getNature() { return artifact.isSnapshot() ? Nature.RELEASE_OR_SNAPSHOT : Nature.RELEASE; }
public String getProperty( String key, String defaultValue ) { return artifact.getProperty( key, defaultValue ); }
public Map<String, String> getProperties() { return artifact.getProperties(); }
public static Object getKey( Artifact artifact ) { return artifact.getGroupId() + ':' + artifact.getArtifactId() + ':' + artifact.getBaseVersion(); }
public File getFile() { return artifact.getFile(); }
public String getGroupId() { return artifact.getGroupId(); }
public String getArtifactId() { return artifact.getArtifactId(); }
public String getType() { return artifact.getExtension(); }
private boolean accept(final Artifact artifact) { return exclusions.contains(artifact.getGroupId()); } }