You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/01/10 15:03:36 UTC

[13/13] git commit: fixed refpack plugin, MARMOTTA-397 caused some troubles...

fixed refpack plugin, MARMOTTA-397 caused some troubles...


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

Branch: refs/heads/develop
Commit: 75f106ddebd16c1ddc190f0b3e4013f405962b8b
Parents: 0226c44
Author: Jakob Frank <ja...@apache.org>
Authored: Fri Jan 10 14:26:30 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Fri Jan 10 15:02:53 2014 +0100

----------------------------------------------------------------------
 .../marmotta/maven/plugins/refpack/RefPackMojo.java    | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/75f106dd/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 4b7d96d..8136480 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
@@ -175,7 +175,7 @@ public class RefPackMojo extends AbstractMojo {
     private void collectLibraryDependencies(DependencyNode node, Artifact currentModule) {
 		String groupId = node.getDependency().getArtifact().getGroupId();
         String artifactId = node.getDependency().getArtifact().getArtifactId();
-        if(!groupId.equals(moduleGroupId) || !artifactId.startsWith("marmotta-") || artifactId.equals("marmotta-commons") || artifactId.equals("marmotta-client-js")) {
+        if(!isPackDependency(groupId, artifactId)) {
             // 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) &&
@@ -193,6 +193,15 @@ public class RefPackMojo extends AbstractMojo {
         }
     }
 
+    private boolean isPackDependency(String groupId, String artifactId) {
+        // only marmotta group-id and artifacts starting with marmotta-
+        return groupId.equals(moduleGroupId) && artifactId.startsWith("marmotta-")
+                // but not the commons and the JS-client
+                && !artifactId.equals("marmotta-commons") && !artifactId.equals("marmotta-client-js") 
+                // and not the marmotta-sesame-tools
+                && !artifactId.startsWith("marmotta-util-") && !artifactId.startsWith("marmotta-sail-") && !artifactId.startsWith("marmotta-rio-");
+    }
+
     /**
      * Collect the dependencies to other modules inside the same project
      * @param node
@@ -201,7 +210,7 @@ public class RefPackMojo extends AbstractMojo {
     private void collectModuleDependencies(DependencyNode node, Artifact currentModule) {
 		String groupId = node.getDependency().getArtifact().getGroupId();
         String artifactId = node.getDependency().getArtifact().getArtifactId();
-		if(groupId.equals(moduleGroupId) && artifactId.startsWith("marmotta-") && !artifactId.equals("marmotta-commons") && !artifactId.equals("marmotta-client-js")) {
+		if(isPackDependency(groupId, artifactId)) {
             moduleDependencies.get(currentModule).add(node.getDependency().getArtifact());
         }
     }