portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r719615 - /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java
Date Fri, 21 Nov 2008 16:04:52 GMT
Author: ate
Date: Fri Nov 21 08:04:51 2008
New Revision: 719615

URL: http://svn.apache.org/viewvc?rev=719615&view=rev
Log:
Ensure correct contextName parameter passed to JetspeedDeployer

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java?rev=719615&r1=719614&r2=719615&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/maven/jetspeed-deploy-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/DeployMojo.java
Fri Nov 21 08:04:51 2008
@@ -76,6 +76,7 @@
         private File src;
         private File targetDir;
         private Artifact artifact;
+        private String contextName;
     }
     
     /**
@@ -271,6 +272,25 @@
                         dobj.deployment.targetName = dobj.deployment.targetName.substring(0,
index);
                     }
                 }
+                if (dobj.deployment.infuse.booleanValue())
+                {
+                    if (dobj.deployment.expand.booleanValue())
+                    {
+                        dobj.contextName = dobj.deployment.targetName;
+                    }
+                    else
+                    {
+                        int index = dobj.deployment.targetName.lastIndexOf(".");
+                        if (index > -1)
+                        {
+                            dobj.contextName = dobj.deployment.targetName.substring(0, index);
+                        }
+                        else
+                        {
+                            dobj.contextName = dobj.deployment.targetName;
+                        }
+                    }
+                }
             }
             if (portalDeploy)
             {
@@ -420,7 +440,7 @@
                 }
                 try
                 {
-                    deployFactory.getInstance(dobj.src.getAbsolutePath(), tmpTarget.getAbsolutePath(),
dobj.deployment.targetName, dobj.deployment.infusionStripLoggers.booleanValue(), dobj.deployment.infusionForcedVersion);
+                    deployFactory.getInstance(dobj.src.getAbsolutePath(), tmpTarget.getAbsolutePath(),
dobj.contextName, dobj.deployment.infusionStripLoggers.booleanValue(), dobj.deployment.infusionForcedVersion);
                     dobj.src = tmpTarget;
                 }
                 catch (Exception e)



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message