servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r384773 - in /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task: DeployServiceAssemblyTask.java InstallComponentTask.java InstallSharedLibraryTask.java
Date Fri, 10 Mar 2006 12:22:41 GMT
Author: gnodet
Date: Fri Mar 10 04:22:38 2006
New Revision: 384773

URL: http://svn.apache.org/viewcvs?rev=384773&view=rev
Log:
Fix install/deploy ant tasks to give servicemix the full path of the archive (so that relative
paths are resolved before)

Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/DeployServiceAssemblyTask.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallComponentTask.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallSharedLibraryTask.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/DeployServiceAssemblyTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/DeployServiceAssemblyTask.java?rev=384773&r1=384772&r2=384773&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/DeployServiceAssemblyTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/DeployServiceAssemblyTask.java
Fri Mar 10 04:22:38 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.servicemix.jbi.management.task;
 
+import java.io.File;
+
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
 import org.apache.tools.ant.BuildException;
 
@@ -51,7 +53,11 @@
         if (!file.endsWith(".zip") && !file.endsWith(".jar")) {
             throw new BuildException("file: " + file + " is not an archive");
         }
-        acs.deployServiceAssembly(file);
+        File archive = new File(file);
+        if (!archive.isFile()) {
+            throw new BuildException("file: " + file + " not found");
+        }
+        acs.deployServiceAssembly(archive.getAbsolutePath());
     }
     
 }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallComponentTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallComponentTask.java?rev=384773&r1=384772&r2=384773&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallComponentTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallComponentTask.java
Fri Mar 10 04:22:38 2006
@@ -15,6 +15,7 @@
  */
 package org.apache.servicemix.jbi.management.task;
 
+import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -76,8 +77,12 @@
         if (!file.endsWith(".zip") && !file.endsWith(".jar")) {
             throw new BuildException("file: " + file + " is not an archive");
         }
+        File archive = new File(file);
+        if (!archive.isFile()) {
+            throw new BuildException("file: " + file + " not found");
+        }
         Properties props = getProperties();
-        acs.installComponent(file, props);
+        acs.installComponent(archive.getAbsolutePath(), props);
     }
     
     private Properties getProperties() throws IOException {

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallSharedLibraryTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallSharedLibraryTask.java?rev=384773&r1=384772&r2=384773&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallSharedLibraryTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/InstallSharedLibraryTask.java
Fri Mar 10 04:22:38 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.servicemix.jbi.management.task;
 
+import java.io.File;
+
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
 import org.apache.tools.ant.BuildException;
 
@@ -50,7 +52,11 @@
         if (!file.endsWith(".zip") && !file.endsWith(".jar")) {
             throw new BuildException("file: " + file + " is not an archive");
         }
-        acs.installSharedLibrary(file);
+        File archive = new File(file);
+        if (!archive.isFile()) {
+            throw new BuildException("file: " + file + " not found");
+        }
+        acs.installSharedLibrary(archive.getAbsolutePath());
     }
     
 }



Mime
View raw message