You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2013/02/28 18:02:47 UTC

[4/5] git commit: handleing the special case of 'marmotta-commons' which is a dependency and not a module

handleing the special case of 'marmotta-commons' which is a dependency and not a module


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/c755b2bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/c755b2bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/c755b2bb

Branch: refs/heads/master
Commit: c755b2bb0bd5a0e109d5b8918d66a148a4cd3dc3
Parents: 3efca16
Author: Sergio Fernández <wi...@apache.org>
Authored: Thu Feb 28 17:58:25 2013 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Thu Feb 28 17:58:25 2013 +0100

----------------------------------------------------------------------
 .../maven/plugins/refpack/RefPackMojo.java         |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c755b2bb/build/plugins/refpack-maven-plugin/src/main/java/org/apache/marmotta/maven/plugins/refpack/RefPackMojo.java
----------------------------------------------------------------------
diff --git a/build/plugins/refpack-maven-plugin/src/main/java/org/apache/marmotta/maven/plugins/refpack/RefPackMojo.java b/build/plugins/refpack-maven-plugin/src/main/java/org/apache/marmotta/maven/plugins/refpack/RefPackMojo.java
index b7d1619..e22d934 100644
--- a/build/plugins/refpack-maven-plugin/src/main/java/org/apache/marmotta/maven/plugins/refpack/RefPackMojo.java
+++ b/build/plugins/refpack-maven-plugin/src/main/java/org/apache/marmotta/maven/plugins/refpack/RefPackMojo.java
@@ -191,8 +191,9 @@ public class RefPackMojo extends AbstractMojo {
      * @param currentModule
      */
     private void collectLibraryDependencies(DependencyNode node, Artifact currentModule) {
-
-        if(!node.getDependency().getArtifact().getGroupId().equals(moduleGroupId) || !node.getDependency().getArtifact().getArtifactId().startsWith("marmotta-")) {
+		String groupId = node.getDependency().getArtifact().getGroupId();
+        String artifactId = node.getDependency().getArtifact().getArtifactId();
+        if(!groupId.equals(moduleGroupId) || !artifactId.startsWith("marmotta-") || artifactId.equals("marmotta-commons")) {
             // first check if the current artifact is already covered by a module the current module depends on
             for(Artifact dependentArtifact : moduleDependencies.get(currentModule)) {
                 if(moduleLibraries.containsKey(dependentArtifact) &&
@@ -216,7 +217,9 @@ public class RefPackMojo extends AbstractMojo {
      * @param currentModule
      */
     private void collectModuleDependencies(DependencyNode node, Artifact currentModule) {
-        if(node.getDependency().getArtifact().getGroupId().equals(moduleGroupId) && node.getDependency().getArtifact().getArtifactId().startsWith("marmotta-")) {
+		String groupId = node.getDependency().getArtifact().getGroupId();
+        String artifactId = node.getDependency().getArtifact().getArtifactId();
+		if(groupId.equals(moduleGroupId) && artifactId.startsWith("marmotta-") && !artifactId.equals("marmotta-commons")) {
             moduleDependencies.get(currentModule).add(node.getDependency().getArtifact());
         }
     }