-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
98 additions
and
23 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
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
60 changes: 60 additions & 0 deletions
60
core/src/main/java/org/wildfly/channel/MavenCoordinate.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,60 @@ | ||
package org.wildfly.channel; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.util.Objects; | ||
|
||
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; | ||
|
||
public class MavenCoordinate { | ||
|
||
private String groupId; | ||
private String artifactId; | ||
private String version; | ||
|
||
@JsonCreator | ||
public MavenCoordinate(@JsonProperty(value = "groupId") String groupId, | ||
@JsonProperty(value = "artifactId") String artifactId, | ||
@JsonProperty(value = "version") String version) { | ||
this.groupId = groupId; | ||
this.artifactId = artifactId; | ||
this.version = version; | ||
} | ||
|
||
public String getGroupId() { | ||
return groupId; | ||
} | ||
|
||
public String getArtifactId() { | ||
return artifactId; | ||
} | ||
|
||
@JsonInclude(NON_NULL) | ||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "MavenCoordinate{" + | ||
"groupId='" + groupId + '\'' + | ||
", artifactId='" + artifactId + '\'' + | ||
", version='" + version + '\'' + | ||
'}'; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
MavenCoordinate that = (MavenCoordinate) o; | ||
return Objects.equals(groupId, that.groupId) && Objects.equals(artifactId, that.artifactId) && Objects.equals(version, that.version); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(groupId, artifactId, version); | ||
} | ||
} |
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
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
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
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
schemaVersion: "2.0.0" | ||
name: My Required Channel | ||
manifest: | ||
gav: test.channels:required-manifest-2:1.0.0 | ||
maven: | ||
groupId: "test.channels" | ||
artifactId: "required-manifest-2" | ||
version: "1.0.0" | ||
repositories: | ||
- id: test | ||
url: test-repository |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
schemaVersion: "2.0.0" | ||
name: My Required Channel | ||
manifest: | ||
gav: "test.channels:required-manifest:1.0.0" | ||
maven: | ||
groupId: "test.channels" | ||
artifactId: "required-manifest" | ||
version: "1.0.0" | ||
repositories: | ||
- id: test | ||
url: test-repository |
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