Skip to content

Commit

Permalink
Removed ShrinkWrap Resolver dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Mar 13, 2013
1 parent 296773b commit 63bf8e1
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.jboss.forge.parser.xml.Node;
import org.jboss.forge.parser.xml.XMLParser;
import org.jboss.shrinkwrap.resolver.impl.maven.util.Validate;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.repository.WorkspaceReader;
import org.sonatype.aether.repository.WorkspaceRepository;
Expand Down Expand Up @@ -152,9 +151,10 @@ else if (file.isFile())
}
}
// SHRINKRES-102, consider classifier as well
if (!Validate.isNullOrEmpty(artifact.getClassifier()))
String classifier = artifact.getClassifier();
if (classifier != null && !classifier.isEmpty())
{
name.append("-").append(artifact.getClassifier());
name.append("-").append(classifier);
}

// we are looking for a non pom artifact, let's get it
Expand Down Expand Up @@ -232,7 +232,7 @@ else if (file.isFile())

private Set<String> getClassPathEntries(final String classPath)
{
if (Validate.isNullOrEmpty(classPath))
if (classPath == null || classPath.isEmpty())
{
return Collections.emptySet();
}
Expand Down Expand Up @@ -288,15 +288,15 @@ private Artifact createFoundArtifact(final File pomFile)
String type = pom.getTextValueForPatternName("packaging");
String version = pom.getTextValueForPatternName("version");

if (Validate.isNullOrEmpty(groupId))
if (groupId == null || groupId.isEmpty())
{
groupId = pom.getTextValueForPatternName("parent/groupId");
}
if (Validate.isNullOrEmpty(type))
if (type == null || type.isEmpty())
{
type = "jar";
}
if (version == null || version.equals(""))
if (version == null || version.isEmpty())
{
version = pom.getTextValueForPatternName("parent/version");
}
Expand Down

0 comments on commit 63bf8e1

Please sign in to comment.