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

[1/5] git commit: fixed refpack tasks for marmotta

fixed refpack tasks for marmotta


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

Branch: refs/heads/master
Commit: 996f55e9ea88b986601978b29b2f604d73c8b1df
Parents: ee2b9fc
Author: Sergio Fernández <wi...@apache.org>
Authored: Thu Feb 28 17:27:16 2013 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Thu Feb 28 17:27:16 2013 +0100

----------------------------------------------------------------------
 .../maven/plugins/refpack/RefPackMojo.java         |   28 +++++++-------
 1 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/996f55e9/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 8649d78..3bfbe26 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
@@ -17,6 +17,15 @@
  */
 package org.apache.marmotta.maven.plugins.refpack;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.building.ModelBuildingRequest;
@@ -43,15 +52,6 @@ import org.sonatype.aether.resolution.DependencyResolutionException;
 import org.sonatype.aether.resolution.DependencyResult;
 import org.sonatype.aether.util.artifact.DefaultArtifact;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
 /**
  * Goal which touches a timestamp file.
  *
@@ -192,7 +192,7 @@ public class RefPackMojo extends AbstractMojo {
      */
     private void collectLibraryDependencies(DependencyNode node, Artifact currentModule) {
 
-        if(!node.getDependency().getArtifact().getGroupId().equals(moduleGroupId) || !node.getDependency().getArtifact().getArtifactId().startsWith("lmf-")) {
+        if(!node.getDependency().getArtifact().getGroupId().equals(moduleGroupId) || !node.getDependency().getArtifact().getArtifactId().startsWith("marmotta-")) {
             // 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 +216,7 @@ 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("lmf-")) {
+        if(node.getDependency().getArtifact().getGroupId().equals(moduleGroupId) && node.getDependency().getArtifact().getArtifactId().startsWith("marmotta-")) {
             moduleDependencies.get(currentModule).add(node.getDependency().getArtifact());
         }
     }
@@ -303,7 +303,7 @@ public class RefPackMojo extends AbstractMojo {
             Element mainFile = new Element("file");
             pack.addContent(mainFile);
             mainFile.setAttribute("src",module.getFile().getAbsolutePath());
-            mainFile.setAttribute("targetdir","$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/LMF/WEB-INF/lib");
+            mainFile.setAttribute("targetdir","$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/ROOT/WEB-INF/lib");
         }
 
         // add a file entry for each library of the artifact
@@ -311,7 +311,7 @@ public class RefPackMojo extends AbstractMojo {
             Element file = new Element("file");
             pack.addContent(file);
             file.setAttribute("src",library.getFile().getAbsolutePath());
-            file.setAttribute("targetdir","$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/LMF/WEB-INF/lib");
+            file.setAttribute("targetdir","$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/ROOT/WEB-INF/lib");
         }
 
         // add a depends name for each module the current one depends on  (in case the project is not the webapp)
@@ -342,7 +342,7 @@ public class RefPackMojo extends AbstractMojo {
             // add webapp directory from installer configuration
             Element appDir = new Element("fileset");
             appDir.setAttribute("dir",outputDirectory+"/../webapp/");
-            appDir.setAttribute("targetdir","$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/LMF/");
+            appDir.setAttribute("targetdir","$INSTALL_PATH/apache-tomcat-$TOMCAT_VERSION/webapps/ROOT/");
             appDir.setAttribute("includes","**");
 
             pack.addContent(appDir);