-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported from maven-compiler-plugin
- Loading branch information
Showing
2 changed files
with
176 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
processor/src/main/java/org/bsc/maven/plugin/processor/DependencyCoordinate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package org.bsc.maven.plugin.processor; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* Maven-coordinates of a dependency. | ||
* | ||
* @author Ulysses R. Ribeiro | ||
* | ||
*/ | ||
public class DependencyCoordinate { | ||
|
||
private String groupId; | ||
|
||
private String artifactId; | ||
|
||
private String version; | ||
|
||
private String classifier; | ||
|
||
private String type = "jar"; | ||
|
||
public String getGroupId() { | ||
return this.groupId; | ||
} | ||
|
||
public void setGroupId(String groupId) { | ||
this.groupId = groupId; | ||
} | ||
|
||
public String getArtifactId() { | ||
return this.artifactId; | ||
} | ||
|
||
public void setArtifactId(String artifactId) { | ||
this.artifactId = artifactId; | ||
} | ||
|
||
public String getVersion() { | ||
return this.version; | ||
} | ||
|
||
public void setVersion(String version) { | ||
this.version = version; | ||
} | ||
|
||
public String getClassifier() { | ||
return this.classifier; | ||
} | ||
|
||
public void setClassifier(String classifier) { | ||
this.classifier = classifier; | ||
} | ||
|
||
public String getType() { | ||
return this.type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(artifactId, classifier, groupId, type, version); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
DependencyCoordinate other = (DependencyCoordinate) obj; | ||
return Objects.equals(artifactId, other.artifactId) && Objects.equals(classifier, other.classifier) | ||
&& Objects.equals(groupId, other.groupId) && Objects.equals(type, other.type) | ||
&& Objects.equals(version, other.version); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "DependencyCoordinate [groupId=" + groupId + ", artifactId=" + artifactId + ", version=" + version | ||
+ ", classifier=" + classifier + ", type=" + type + "]"; | ||
} | ||
|
||
} |