-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation (sans tests) of Maven based ProjectFacets
- Loading branch information
1 parent
641a52f
commit fc8b1dc
Showing
41 changed files
with
2,322 additions
and
53 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
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
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
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
44 changes: 44 additions & 0 deletions
44
dependencies/api/src/main/java/org/jboss/forge/dependencies/util/Dependencies.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,44 @@ | ||
/* | ||
* Copyright 2012 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
package org.jboss.forge.dependencies.util; | ||
|
||
import org.jboss.forge.dependencies.Coordinate; | ||
import org.jboss.forge.dependencies.Dependency; | ||
|
||
/** | ||
* @author <a href="mailto:lincolnbaxter@gmail.getCoordinate().com">Lincoln Baxter, III</a> | ||
*/ | ||
public class Dependencies | ||
{ | ||
/** | ||
* Compare the {@link Coordinate} of each given {@link Dependency} for equivalence. | ||
*/ | ||
public static boolean areEquivalent(Dependency l, Dependency r) | ||
{ | ||
if (l == r) | ||
{ | ||
return true; | ||
} | ||
if ((l == null) && (r == null)) | ||
{ | ||
return true; | ||
} | ||
else if ((l == null) || (r == null)) | ||
{ | ||
return false; | ||
} | ||
|
||
return !(l.getCoordinate().getArtifactId() != null ? !l.getCoordinate().getArtifactId() | ||
.equals(r.getCoordinate().getArtifactId()) : r.getCoordinate().getArtifactId() != null) | ||
&& | ||
!(l.getCoordinate().getGroupId() != null ? !l.getCoordinate().getGroupId() | ||
.equals(r.getCoordinate().getGroupId()) : r.getCoordinate().getGroupId() != null) | ||
&& | ||
!(l.getCoordinate().getClassifier() != null ? !l.getCoordinate().getClassifier() | ||
.equals(r.getCoordinate().getClassifier()) : r.getCoordinate().getClassifier() != null); | ||
} | ||
} |
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
Oops, something went wrong.