[jboss-svn-commits] JBL Code SVN: r14449 - in labs/jbossbuild/maven-plugins/trunk/maven-jboss-deploy-plugin: src/main/java/org/jboss/maven/plugins/deploy and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 22 12:00:11 EDT 2007


Author: pgier
Date: 2007-08-22 12:00:11 -0400 (Wed, 22 Aug 2007)
New Revision: 14449

Modified:
   labs/jbossbuild/maven-plugins/trunk/maven-jboss-deploy-plugin/
   labs/jbossbuild/maven-plugins/trunk/maven-jboss-deploy-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java
Log:
[JBBUILD-403] Adding groupId parameter.


Property changes on: labs/jbossbuild/maven-plugins/trunk/maven-jboss-deploy-plugin
___________________________________________________________________
Name: svn:ignore
   - .classpath
.project
target
.settings

   + .classpath
.project
target
.settings
eclipse-target


Modified: labs/jbossbuild/maven-plugins/trunk/maven-jboss-deploy-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java
===================================================================
--- labs/jbossbuild/maven-plugins/trunk/maven-jboss-deploy-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java	2007-08-22 13:19:20 UTC (rev 14448)
+++ labs/jbossbuild/maven-plugins/trunk/maven-jboss-deploy-plugin/src/main/java/org/jboss/maven/plugins/deploy/JBossDeployMojo.java	2007-08-22 16:00:11 UTC (rev 14449)
@@ -109,6 +109,13 @@
    private Map imports;
 
    /**
+    * This allows the maven groupId to be overridden.  For example, the pom groupId
+    * might be "org.jboss", but the jboss repository groupId should just be "jboss".
+    * @parameter
+    */
+   private String groupId;
+
+   /**
     * This is the list of artifacts exported from this project.
     * By default the project artifact will be included in this list.
     * If there is no project artifact, this plugin will look for an attached
@@ -121,7 +128,7 @@
     * 
     * @parameter
     */
-   private Set<String> exports;
+   private Set exports;
 
    /**
     * Main execution path of the plugin.  Generates component-info.xml, and copies jar files to repository location.
@@ -141,9 +148,14 @@
       if (exports == null) {
          exports = new HashSet<String>();
       }
-      String jbossGroupId = project.getGroupId().replace('.', '/');
+      if (groupId == null || groupId.equals(""))
+      {
+         groupId = project.getGroupId();
+      }
+      String groupIdPath = groupId.replace('.', '/');
+      
       // Initialize some local variables
-      File deployToDir = new File(jbossDeployRoot + fileSep + jbossGroupId + fileSep
+      File deployToDir = new File(jbossDeployRoot + fileSep + groupIdPath + fileSep
             + project.getArtifactId() + fileSep + project.getVersion() + fileSep);
       File deployToLibDir = new File(deployToDir.getAbsolutePath() + fileSep + "lib" + fileSep);
 
@@ -170,7 +182,7 @@
       }
 
       // Evaluate the place holders in the template
-      String componentId = jbossGroupId + "/" + project.getArtifactId();
+      String componentId = groupIdPath + "/" + project.getArtifactId();
       evaluateVariable(compInfoTemplate, "project.name", componentId + "-component-info");
       evaluateVariable(compInfoTemplate, "component.id", componentId);
       evaluateVariable(compInfoTemplate, "project.version", project.getVersion());




More information about the jboss-svn-commits mailing list