diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-06 21:47:42 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-06 21:47:42 +0000 |
commit | fa19b51cbc4e4859924f57ffe0bbc374b2b6900c (patch) | |
tree | 9ad7f4b09557ce991a8884da9568470319ecf16b | |
parent | 4d72e26425ad1501ae3f5b41203533e905b3c640 (diff) |
Exclude the project itself from the resolution so that it can be built offline
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@822525 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java index 1bac66efc3..52821e5214 100644 --- a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java +++ b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java @@ -765,14 +765,18 @@ public class ModuleBundlesBuildMojo extends AbstractMojo { artifactCollector); CollectingDependencyNodeVisitor visitor = new CollectingDependencyNodeVisitor(); rootNode.accept(visitor); + // Add included artifacts for (Object node : visitor.getNodes()) { DependencyNode depNode = (DependencyNode)node; int state = depNode.getState(); if (state == DependencyNode.INCLUDED ) { Artifact artifact = depNode.getArtifact(); - resolver.resolve(artifact, remoteRepos, local); - artifacts.add(artifact); + // Exclude the project artifact to avoid offline resolution failure + if (!artifact.equals(project.getArtifact())) { + resolver.resolve(artifact, remoteRepos, local); + artifacts.add(artifact); + } } } // Scan for newer versions that are omitted |