servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r384488 - in /incubator/servicemix/trunk: servicemix-assembly/src/main/release/examples/ant-task/ servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/
Date Thu, 09 Mar 2006 11:01:36 GMT
Author: gnodet
Date: Thu Mar  9 03:01:34 2006
New Revision: 384488

URL: http://svn.apache.org/viewcvs?rev=384488&view=rev
Log:
Fix output of listing tasks and demo

Modified:
    incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/README.txt
    incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix-ant-task.xml
    incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix_ant_taskdef.properties
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/JbiTask.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListBindingComponentsTask.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceAssembliesTask.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceEnginesTask.java
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListSharedLibrariesTask.java

Modified: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/README.txt
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/README.txt?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/README.txt
(original)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/README.txt
Thu Mar  9 03:01:34 2006
@@ -1,7 +1,7 @@
     Servicemix Ant Task Help.
     ==========================================================
-    Usage : ant -f <fullpath>/jbi_admin.xml [options] [target]
-    options: -D<property>;=<value>; use value for given property
+    Usage : ant -f <fullpath>/servicemix-ant-task.xml [options] [target]
+    options: -D<property>=<value> use value for given property
     
     Targets Available:
     ----------------------------------------------------------
@@ -16,7 +16,7 @@
         sm.install.file   : file path for installing service engine or binding component.
 
     Example :
-     ant -f servicemix-admin.xml -Dsm.install.file=testarchive.jar install-component-task
+     ant -f servicemix-ant-task.xml -Dsm.install.file=testarchive.jar install-component
      
     ----------------------------------------------------------
     target : uninstall-component 
@@ -30,7 +30,7 @@
         sm.component.name : name of service engine or binding component to uninstall.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=testarchive uninstall-component
+    ant -f servicemix-ant-task.xml -Dsm.component.name=testarchive uninstall-component
 
     ----------------------------------------------------------
     target : install-shared-library 
@@ -44,7 +44,7 @@
         sm.install.file   : zip file path for installing shared library installation file.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.install.file=/dir/sharedlib.zip install-shared-library
 
+    ant -f servicemix-ant-task.xml -Dsm.install.file=/dir/sharedlib.zip install-shared-library
 
                 
     ----------------------------------------------------------
     target : uninstall-shared-library 
@@ -58,7 +58,7 @@
         sm.shared.library.name : uninstall shared library, given name.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.shared.library.name="sharedlibname" uninstall-shared-library
 
+    ant -f servicemix-ant-task.xml -Dsm.shared.library.name="sharedlibname" uninstall-shared-library
 
                 
     ----------------------------------------------------------
     target : start-component 
@@ -72,7 +72,7 @@
         sm.component.name  : component name, service engine or binding component to start.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=componentname start-component  
+    ant -f servicemix-ant-task.xml -Dsm.component.name=componentname start-component  
 
     ----------------------------------------------------------
     target : stop-component 
@@ -86,7 +86,7 @@
         sm.component.name  : component name, service engine or binding component to stop.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=componentname stop-component  
+    ant -f servicemix-ant-task.xml -Dsm.component.name=componentname stop-component  
 
     ----------------------------------------------------------
     target : shutdown-component 
@@ -100,7 +100,7 @@
         sm.component.name  : component name, service engine or binding component to shutdown.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=componentname shutdown-component  
+    ant -f servicemix-ant-task.xml -Dsm.component.name=componentname shutdown-component 

 
     ----------------------------------------------------------
     target : deploy-service-assembly 
@@ -114,7 +114,7 @@
         sm.deploy.file     : fully qualified service assembly file path.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.deploy.file deploy-service-assembly  
+    ant -f servicemix-ant-task.xml -Dsm.deploy.file deploy-service-assembly  
 
     ----------------------------------------------------------
     target : undeploy-service-assembly 
@@ -128,7 +128,7 @@
         sm.service.assembly.name  : service assembly name previously deployed. 
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name undeploy-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name undeploy-service-assemply 

 
     ----------------------------------------------------------
     target : start-service-assembly 
@@ -142,7 +142,7 @@
         sm.service.assembly.name : service assembly name to start.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name start-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name start-service-assemply  
 
     ----------------------------------------------------------
     target : stop-service-assembly 
@@ -156,7 +156,7 @@
         sm.service.assembly.name : service assembly name to stop.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name stop-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name stop-service-assembly  
 
     ----------------------------------------------------------
     target : shutdown-service-assembly 
@@ -170,7 +170,7 @@
         sm.service.assembly.name : service assembly name to shutdown.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name shutdown-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name shutdown-service-assemply 

 
     ----------------------------------------------------------
     target : list-service-engines 
@@ -186,7 +186,7 @@
         sm.shared.library.name : shared library name to list.
 
     Example :
-    ant -f servicemix-admin.xml list-service-engines  
+    ant -f servicemix-ant-task.xml list-service-engines  
 
     ----------------------------------------------------------
     target : list-binding-components 
@@ -202,7 +202,7 @@
         sm.service.assembly.name : service assembly name to list.
 
     Example :
-    ant -f servicemix-admin.xml list-binding-components  
+    ant -f servicemix-ant-task.xml list-binding-components  
 
     ----------------------------------------------------------
     target : list-shared-libraries 
@@ -217,10 +217,10 @@
         sm.shared.library.name : shared library name to list.
 
     Example :
-    ant -f servicemix-admin.xml list-binding-components  
+    ant -f servicemix-ant-task.xml list-shared-libraries   
 
     ----------------------------------------------------------
-    target : deployed-assemblies 
+    target : list-service-assemblies 
         - list deployed Service Assemblies in Servicemix.
     
     options :        
@@ -233,18 +233,5 @@
         sm.service.assembly.name : service assembly name to list.
         
     Example :
-    ant -f servicemix-admin.xml deployed-assemblies  
+    ant -f servicemix-ant-task.xml list-service-assemblies  
 
-    ----------------------------------------------------------
-    target : deployed-serviceunits 
-        - List deployed service units for a Component.
-    
-    options :        
-        sm.username        : Servicemix user name.
-        sm.password        : Servicemix password.
-        sm.host            : host name where Servicemix is running.
-        sm.port            : port where Servicemix is listening.
-        sm.component.name  : component name. 
-    
-    Example :
-    ant -f servicemix-admin.xml list-binding-components  

Modified: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix-ant-task.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix-ant-task.xml?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix-ant-task.xml
(original)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix-ant-task.xml
Thu Mar  9 03:01:34 2006
@@ -12,15 +12,17 @@
     <!-- Servicemix ant task definitions  -->
     <taskdef file="${servicemix.taskdefs}">
         <classpath id="servicemix.classpath">            
-            <fileset dir="../../lib/optional">
-                <include name="**/*.jar"/>
-            </fileset>            
+            <fileset dir="../..">
+                <include name="*.jar"/>
+            </fileset>
             <fileset dir="../../lib">
-                <include name="**/*.jar"/>
+                <include name="*.jar"/>
             </fileset>
-            <fileset dir="../..">
+            <!--
+            <fileset dir="../../lib/optional">
                 <include name="**/*.jar"/>
-            </fileset>
+            </fileset>      
+            -->      
         </classpath>
     </taskdef>
     
@@ -56,12 +58,13 @@
      
      <!-- install-component task -->
      <target name="install-component" description="Installs service engine or binding
component with installation parameters.">
+         <echo message=" install-component" />
          <echo message=" Installing a service engine or binding component."/>
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    file=${sm.install.file}" />
          
-         <install-component-task 
+         <jbi-install-component
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -70,12 +73,12 @@
      
      <!-- uninstall-component task -->
      <target name="uninstall-component" description="Uninstalls service engine or binding
component.">
-         <echo message="    uninstall-component" />
-         <echo message="    Uninstalling a Service Engine or Binding Component." />
+         <echo message=" uninstall-component" />
+         <echo message=" Uninstalling a Service Engine or Binding Component." />
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.component.name}" />
-         <uninstall-component-task
+         <jbi-uninstall-component
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -87,12 +90,12 @@
      <!-- install-shared-library -->
      <target name="install-shared-library" description="Installs shared library.">
         <echo message=" install-shared-library" />
-        <echo message="    Installs a shared library in Servicemix." />
+        <echo message=" Installs a shared library in Servicemix." />
         <echo message="    host=${sm.host}" />
         <echo message="    port=${sm.port}" />
         <echo message="    file=${sm.install.file}" /> 
         
-        <install-shared-library-task
+        <jbi-install-shared-library
             username="${sm.username}" 
             password="${sm.password}"
             host="${sm.host}"
@@ -108,7 +111,7 @@
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.shared.library.name}" />
          
-         <uninstall-shared-library-task
+         <jbi-uninstall-shared-library
             username="${sm.username}" 
             password="${sm.password}"
             host="${sm.host}"
@@ -125,7 +128,7 @@
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.component.name}" />
          
-         <start-component-task
+         <jbi-start-component
             username="${sm.username}" 
             password="${sm.password}"
             host="${sm.host}"
@@ -142,7 +145,7 @@
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.component.name}" />
          
-         <stop-component-task
+         <jbi-stop-component
             username="${sm.username}" 
             password="${sm.password}"
             host="${sm.host}"
@@ -153,13 +156,13 @@
      
      <!-- shutdown-component -->
      <target name="shutdown-component" description="shut downs a particular Servicemix
component.">
-         <echo message=" shut-down-component" />
+         <echo message=" shutdown-component" />
          <echo message=" shuts down a particular component (service engine or binding
component) in Servicemix" />
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.component.name}" />
          
-         <shutdown-component-task
+         <jbi-shutdown-component
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -169,13 +172,13 @@
      
      <!-- deploy-service-assembly -->
      <target name="deploy-service-assembly" description="deploys service assembly in Servicemix.">
-         <echo message=" deploy-assembly" />
+         <echo message=" deploy-service-assembly" />
          <echo message=" deploys a service assembly in Servicemix." />
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    file=${sm.deploy.file}" />
          
-         <install-assembly-task
+         <jbi-deploy-service-assembly
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -185,13 +188,13 @@
      
      <!-- undeploy-service-assembly -->
      <target name="undeploy-service-assembly" description="undeploys a previously deployed
service assembly in Servicemix.">
-         <echo message=" undeploy-assembly" />
+         <echo message=" undeploy-service-assembly" />
          <echo message=" undeploys a previously deployed service assembly in Sericemix."/>
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.service.assembly.name}" />
          
-         <uninstall-assembly-task
+         <jbi-undeploy-service-assembly
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -202,13 +205,13 @@
      
      <!-- start-service-assembly -->
      <target name="start-service-assembly" description="starts a particular service assembly
in Servicemix.">
-         <echo message=" start-assembly" />
+         <echo message=" start-service-assembly" />
          <echo message=" starts a particular service assembly in Servicemix." />
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.service.assembly.name}" />
          
-         <start-assembly-task
+         <jbi-start-service-assembly
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -219,13 +222,13 @@
      
      <!-- stop-service-assembly -->
      <target name="stop-service-assembly" description="stops a particular service assembly
in Servicemix.">
-         <echo message=" shutdown-assembly" />
+         <echo message=" stop-service-assembly" />
          <echo message=" stops a particular service assembly in Servicemix." />
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.service.assembly.name}" /> 
 
-         <stop-assembly-task
+         <jbi-stop-service-assembly
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -235,13 +238,13 @@
      
      <!-- shutdown-service-assembly -->
      <target name="shutdown-service-assembly" description="shuts down a particular service
assembly in Servicemix.">
-         <echo message=" shutdown-assembly" />
+         <echo message=" shutdown-service-assembly" />
          <echo message=" shuts down a particular service assembly in Servicemix." />
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
          <echo message="    name=${sm.service.assembly.name}" /> 
 
-         <shutdown-assembly-task
+         <jbi-shutdown-service-assembly
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -260,7 +263,7 @@
          <echo message="    serviceAssemblyName=${sm.service.assembly.name}" />
          <echo message="    sharedLibraryName=${sm.shared.library.name}" />
 
-         <list-engines-task
+         <jbi-list-service-engines
              username="${sm.username}"
              password="${sm.password}"
              host="${sm.host}"
@@ -281,7 +284,7 @@
          <echo message="    sharedLibraryName=${sm.shared.library.name}" />
          <echo message="    serviceAssemblyName=${sm.service.assembly.name}" />
 
-         <list-component-task
+         <jbi-list-binding-components
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -301,7 +304,7 @@
          <echo message="    componentName=${sm.component.name}" />
          <echo message="    sharedLibraryName=${sm.shared.library.name}" />
 
-         <list-libraries-task
+         <jbi-list-shared-libraries
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -310,9 +313,9 @@
       />
       </target>
      
-     <!-- list-assemblies -->
-     <target name="deployed-assemblies" description="list deployed Service Assemblies
in Servicemix.">
-         <echo message=" deployed-assemblies" />
+     <!-- list-service-assemblies -->
+     <target name="list-service-assemblies" description="list deployed Service Assemblies
in Servicemix.">
+         <echo message=" list-service-assemblies" />
          <echo message=" list deployed Service Assemblies in Servicemix." />
          <echo message="    host=${sm.host}" />
          <echo message="    port=${sm.port}" />
@@ -320,7 +323,7 @@
          <echo message="    componentName=${sm.component.name}" />
          <echo message="    serviceAssemblyName=${sm.service.assembly.name}" />
 
-         <deployed-assemblies-task
+         <jbi-list-service-assemblies
              username="${sm.username}" 
              password="${sm.password}"
              host="${sm.host}"
@@ -331,31 +334,13 @@
      
      </target>
 
-     <!-- deployed-serviceunits -->
-     <target name="deployed-serviceunits" description="List deployed service units for
a Component.">
-         <echo message=" deployed-serviceunits" />
-         <echo message=" List deployed service units for a Component." />
-         <echo message="    host=${sm.host}" />
-         <echo message="    port=${sm.port}" />
-         <echo message="    componentname=${sm.component.name}" />         
-
-         <deployed-serviceunits-task
-             username="${sm.username}" 
-             password="${sm.password}"
-             host="${sm.host}"
-             componentName="${sm.component.name}"
-         />
-     
-     </target>
-     
-     
      <!-- Help/Usage target -->
     <target name="help" description="Description of commands and their parameters.">
     <echo>         
     Servicemix Ant Task Help.
     ==========================================================
-    Usage : ant -f &lt;fullpath&gt;/jbi_admin.xml [options] [target]
-    options: -D&lt;property&gt;=&lt;value&gt; use value for given property
+    Usage : ant -f &lt;fullpath>/servicemix-ant-task.xml [options] [target]
+    options: -D&lt;property>=&lt;value> use value for given property
     
     Targets Available:
     ----------------------------------------------------------
@@ -370,7 +355,7 @@
         sm.install.file   : file path for installing service engine or binding component.
 
     Example :
-     ant -f servicemix-admin.xml -Dsm.install.file=testarchive.jar install-component-task
+     ant -f servicemix-ant-task.xml -Dsm.install.file=testarchive.jar install-component
      
     ----------------------------------------------------------
     target : uninstall-component 
@@ -384,7 +369,7 @@
         sm.component.name : name of service engine or binding component to uninstall.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=testarchive uninstall-component
+    ant -f servicemix-ant-task.xml -Dsm.component.name=testarchive uninstall-component
 
     ----------------------------------------------------------
     target : install-shared-library 
@@ -398,7 +383,7 @@
         sm.install.file   : zip file path for installing shared library installation file.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.install.file=/dir/sharedlib.zip install-shared-library
 
+    ant -f servicemix-ant-task.xml -Dsm.install.file=/dir/sharedlib.zip install-shared-library
 
                 
     ----------------------------------------------------------
     target : uninstall-shared-library 
@@ -412,7 +397,7 @@
         sm.shared.library.name : uninstall shared library, given name.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.shared.library.name=sharedlibname uninstall-shared-library
 
+    ant -f servicemix-ant-task.xml -Dsm.shared.library.name="sharedlibname" uninstall-shared-library
 
                 
     ----------------------------------------------------------
     target : start-component 
@@ -426,7 +411,7 @@
         sm.component.name  : component name, service engine or binding component to start.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=componentname start-component  
+    ant -f servicemix-ant-task.xml -Dsm.component.name=componentname start-component  
 
     ----------------------------------------------------------
     target : stop-component 
@@ -440,7 +425,7 @@
         sm.component.name  : component name, service engine or binding component to stop.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=componentname stop-component  
+    ant -f servicemix-ant-task.xml -Dsm.component.name=componentname stop-component  
 
     ----------------------------------------------------------
     target : shutdown-component 
@@ -454,7 +439,7 @@
         sm.component.name  : component name, service engine or binding component to shutdown.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.component.name=componentname shutdown-component  
+    ant -f servicemix-ant-task.xml -Dsm.component.name=componentname shutdown-component 

 
     ----------------------------------------------------------
     target : deploy-service-assembly 
@@ -468,7 +453,7 @@
         sm.deploy.file     : fully qualified service assembly file path.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.deploy.file deploy-service-assembly  
+    ant -f servicemix-ant-task.xml -Dsm.deploy.file deploy-service-assembly  
 
     ----------------------------------------------------------
     target : undeploy-service-assembly 
@@ -482,7 +467,7 @@
         sm.service.assembly.name  : service assembly name previously deployed. 
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name undeploy-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name undeploy-service-assembly 

 
     ----------------------------------------------------------
     target : start-service-assembly 
@@ -496,7 +481,7 @@
         sm.service.assembly.name : service assembly name to start.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name start-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name start-service-assembly  
 
     ----------------------------------------------------------
     target : stop-service-assembly 
@@ -510,7 +495,7 @@
         sm.service.assembly.name : service assembly name to stop.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name stop-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name stop-service-assembly  
 
     ----------------------------------------------------------
     target : shutdown-service-assembly 
@@ -524,7 +509,7 @@
         sm.service.assembly.name : service assembly name to shutdown.
     
     Example :
-    ant -f servicemix-admin.xml -Dsm.service.assembly.name shutdown-service-assemply  
+    ant -f servicemix-ant-task.xml -Dsm.service.assembly.name shutdown-service-assembly 

 
     ----------------------------------------------------------
     target : list-service-engines 
@@ -540,7 +525,7 @@
         sm.shared.library.name : shared library name to list.
 
     Example :
-    ant -f servicemix-admin.xml list-service-engines  
+    ant -f servicemix-ant-task.xml list-service-engines  
 
     ----------------------------------------------------------
     target : list-binding-components 
@@ -556,7 +541,7 @@
         sm.service.assembly.name : service assembly name to list.
 
     Example :
-    ant -f servicemix-admin.xml list-binding-components  
+    ant -f servicemix-ant-task.xml list-binding-components  
 
     ----------------------------------------------------------
     target : list-shared-libraries 
@@ -571,10 +556,10 @@
         sm.shared.library.name : shared library name to list.
 
     Example :
-    ant -f servicemix-admin.xml list-shared-libraries  
+    ant -f servicemix-ant-task.xml list-shared-libraries   
 
     ----------------------------------------------------------
-    target : deployed-assemblies 
+    target : list-service-assemblies 
         - list deployed Service Assemblies in Servicemix.
     
     options :        
@@ -587,24 +572,10 @@
         sm.service.assembly.name : service assembly name to list.
         
     Example :
-    ant -f servicemix-admin.xml deployed-assemblies  
-
-    ----------------------------------------------------------
-    target : deployed-serviceunits 
-        - List deployed service units for a Component.
-    
-    options :        
-        sm.username        : Servicemix user name.
-        sm.password        : Servicemix password.
-        sm.host            : host name where Servicemix is running.
-        sm.port            : port where Servicemix is listening.
-        sm.component.name  : component name. 
-    
-    Example :
-    ant -f servicemix-admin.xml deployed-serviceunits  
+    ant -f servicemix-ant-task.xml list-service-assemblies  
 
     </echo>
     </target>
 
 
-</project>
\ No newline at end of file
+</project>

Modified: incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix_ant_taskdef.properties
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix_ant_taskdef.properties?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix_ant_taskdef.properties
(original)
+++ incubator/servicemix/trunk/servicemix-assembly/src/main/release/examples/ant-task/servicemix_ant_taskdef.properties
Thu Mar  9 03:01:34 2006
@@ -1,18 +1,17 @@
 # Servicemix Jbi Ant definitions 
-install-component-task=org.apache.servicemix.jbi.management.task.InstallComponentTask
-uninstall-component-task=org.apache.servicemix.jbi.management.task.UninstallComponentTask
-install-shared-library-task=org.apache.servicemix.jbi.management.task.InstallSharedLibraryTask
-uninstall-shared-library-task=org.apache.servicemix.jbi.management.task.UninstallSharedLibraryTask
-start-component-task=org.apache.servicemix.jbi.management.task.StartComponentTask
-stop-component-task=org.apache.servicemix.jbi.management.task.StopComponentTask
-shutdown-component-task=org.apache.servicemix.jbi.management.task.ShutDownComponentTask
-install-assembly-task=org.apache.servicemix.jbi.management.task.InstallAssemblyTask
-uninstall-assembly-task=org.apache.servicemix.jbi.management.task.UninstallAssemblyTask
-start-assembly-task=org.apache.servicemix.jbi.management.task.StartAssemblyTask
-stop-assembly-task=org.apache.servicemix.jbi.management.task.StopAssemblyTask
-shutdown-assembly-task=org.apache.servicemix.jbi.management.task.ShutDownAssemblyTask
-list-engines-task=org.apache.servicemix.jbi.management.task.ListEnginesTask
-list-component-task=org.apache.servicemix.jbi.management.task.ListComponentTask
-list-libraries-task=org.apache.servicemix.jbi.management.task.ListLibrariesTask
-deployed-assemblies-task=org.apache.servicemix.jbi.management.task.DeployedAssembliesTask
-deployed-serviceunits-task=org.apache.servicemix.jbi.management.task.DeployedServiceUnitsTask
+jbi-install-component=org.apache.servicemix.jbi.management.task.InstallComponentTask
+jbi-uninstall-component=org.apache.servicemix.jbi.management.task.UninstallComponentTask
+jbi-install-shared-library=org.apache.servicemix.jbi.management.task.InstallSharedLibraryTask
+jbi-uninstall-shared-library=org.apache.servicemix.jbi.management.task.UninstallSharedLibraryTask
+jbi-start-component=org.apache.servicemix.jbi.management.task.StartComponentTask
+jbi-stop-component=org.apache.servicemix.jbi.management.task.StopComponentTask
+jbi-shutdown-component=org.apache.servicemix.jbi.management.task.ShutDownComponentTask
+jbi-deploy-service-assembly=org.apache.servicemix.jbi.management.task.DeployServiceAssemblyTask
+jbi-undeploy-service-assembly=org.apache.servicemix.jbi.management.task.UndeployServiceAssemblyTask
+jbi-start-service-assembly=org.apache.servicemix.jbi.management.task.StartServiceAssemblyTask
+jbi-stop-service-assembly=org.apache.servicemix.jbi.management.task.StopServiceAssemblyTask
+jbi-shutdown-service-assembly=org.apache.servicemix.jbi.management.task.ShutDownServiceAssemblyTask
+jbi-list-service-engines=org.apache.servicemix.jbi.management.task.ListServiceEnginesTask
+jbi-list-binding-components=org.apache.servicemix.jbi.management.task.ListBindingComponentsTask
+jbi-list-shared-libraries=org.apache.servicemix.jbi.management.task.ListSharedLibrariesTask
+jbi-list-service-assemblies=org.apache.servicemix.jbi.management.task.ListServiceAssembliesTask

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AdminCommandsService.java
Thu Mar  9 03:01:34 2006
@@ -300,8 +300,18 @@
             }
             // Check deployed service assembly
             // TODO: check SA dependency on component 
-            if (serviceAssemblyName != null && serviceAssemblyName.length() >
0 && !container.getDeploymentService().isSaDeployed(serviceAssemblyName)) {
-                continue;
+            if (serviceAssemblyName != null && serviceAssemblyName.length() >
0) {
+                String[] saNames = container.getRegistry().getDeployedServiceAssembliesForComponent(component.getName());
+                boolean found = false;
+                for (int i = 0; i < saNames.length; i++) {
+                    if (serviceAssemblyName.equals(saNames[i])) {
+                        found = true;
+                        break;
+                    }
+                }
+                if (!found) {
+                    continue;
+                }
             }
             components.add(component);
         }
@@ -311,20 +321,20 @@
         buffer.append("<component-info-list xmlns='http://java.sun.com/xml/ns/jbi/component-info-list'
version='1.0'>\n");
         for (Iterator iter = components.iterator(); iter.hasNext();) {
             ComponentMBeanImpl component = (ComponentMBeanImpl) iter.next();
-            buffer.append("\t<component-info>");
+            buffer.append("  <component-info>");
             if (!component.isBinding() && component.isService()) {
                 buffer.append(" type='service-engine'");
             } else if (component.isBinding() && !component.isService()) {
                 buffer.append(" type='binding-component'");
             }
             buffer.append(" name='" + component.getName() + "'");
-            buffer.append(" state='" + component.getCurrentState() + "'>");
+            buffer.append(" state='" + component.getCurrentState() + "'>\n");
             if (component.getDescription() != null) {
-                buffer.append("\t\t<description>");
+                buffer.append("    <description>");
                 buffer.append(component.getDescription());
                 buffer.append("<description>\n");
             }
-            buffer.append("\t</component-info>\n");
+            buffer.append("  </component-info>\n");
         }
         buffer.append("</component-info-list>");
         return buffer.toString();
@@ -375,19 +385,22 @@
         buffer.append("<service-assembly-info-list xmlns='http://java.sun.com/xml/ns/jbi/component-info-list'
version='1.0'>\n");
         for (Iterator iter = assemblies.iterator(); iter.hasNext();) {
             ServiceAssemblyLifeCycle sa = (ServiceAssemblyLifeCycle) iter.next();
-            buffer.append("\t<service-assembly-info");
+            buffer.append("  <service-assembly-info");
             buffer.append(" name='" + sa.getName() + "'");
-            buffer.append(" state='" + sa.getCurrentState() + "'/>");
-            buffer.append(" <description>" + sa.getDescription() + "</description>");
-            buffer.append("\t</service-assembly-info>\n");
+            buffer.append(" state='" + sa.getCurrentState() + "'>\n");
+            buffer.append("    <description>" + sa.getDescription() + "</description>\n");
 
             ServiceUnitLifeCycle[] serviceUnitList = sa.getDeployedSUs();
             for (int i = 0; i < serviceUnitList.length; i++) {
-                buffer.append("\t<service-unit-info");
+                buffer.append("    <service-unit-info");
                 buffer.append(" name='" + serviceUnitList[i].getName() + "'");
-                buffer.append(" state='" + serviceUnitList[i].getCurrentState() + "/>");
-                buffer.append("\t</service-unit-info");
+                buffer.append(" state='" + serviceUnitList[i].getCurrentState() + "'");
+                buffer.append(" deployed-on='" + serviceUnitList[i].getComponentName() +
"'>\n");
+                buffer.append("      <description>" + serviceUnitList[i].getDescription()
+ "</description>\n");
+                buffer.append("    </service-unit-info>\n");
             }
+            
+            buffer.append("  </service-assembly-info>\n");
         }
         buffer.append("</service-assembly-info-list>");
 

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/JbiTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/JbiTask.java?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/JbiTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/JbiTask.java
Thu Mar  9 03:01:34 2006
@@ -25,13 +25,12 @@
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
 import org.apache.servicemix.jbi.framework.DeploymentService;
 import org.apache.servicemix.jbi.management.ManagementContext;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;
 
 /**
@@ -41,8 +40,6 @@
  */
 public abstract class JbiTask extends Task {
     
-    protected final Log log = LogFactory.getLog(getClass());
-    
     private String serverProtocol = "rmi";
     private String host = "localhost";
     private String containerName = JBIContainer.DEFAULT_NAME;
@@ -59,15 +56,10 @@
      * Get the JMXServiceURL - built from the protocol used and host names
      * @return the url
      */
-    public JMXServiceURL getServiceURL(){
+    public JMXServiceURL getServiceURL() throws MalformedURLException {
         JMXServiceURL url = null;
-        try {
-            url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" 
-                    + host + ":" + port + jndiPath);
-        }
-        catch (MalformedURLException e) {
-            log.error("error creating serviceURL: ",e);
-        }
+        url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" 
+                + host + ":" + port + jndiPath);
         return url;
     }
     
@@ -77,7 +69,7 @@
      * @return the JMXConnector
      * @throws IOException
      */
-    public JMXConnector getJMXConnector (JMXServiceURL url) throws IOException{
+    public JMXConnector getJMXConnector (JMXServiceURL url) throws IOException {
         return JMXConnectorFactory.connect(url);
     }
     
@@ -85,13 +77,13 @@
      * initialize the connection
      * @throws BuildException
      */
-    public void init() throws BuildException{
+    public void init() throws BuildException {
         super.init();
         try {
             this.jmxConnector = getJMXConnector(getServiceURL());
         }
-        catch (IOException e) {
-            log.error("Failed to initialize the JbiTask",e);
+        catch (Throwable e) {
+            log("Failed to initialize the JbiTask: " + e.getMessage(), Project.MSG_ERR);
             throw new BuildException(e);
         }
     }
@@ -107,7 +99,7 @@
                 jmxConnector.close();
             }
             catch (IOException e) {
-                log.warn("caught an error closing the jmxConnector",e);
+                log("Caught an error closing the jmxConnector" + e.getMessage(), Project.MSG_WARN);
             }
         }
     }
@@ -272,21 +264,23 @@
     public void execute() throws BuildException {
         AdminCommandsServiceMBean acs;
         try {
+            log("Retrieving remote admin interface", Project.MSG_DEBUG);
             acs = getAdminCommandsService();
-        } catch (IOException e) {
-            log.error("Error accessing ServiceMix administration", e);
+        } catch (Throwable e) {
+            log("Error accessing ServiceMix administration: " + e.getMessage(), Project.MSG_WARN);
             if (isFailOnError()) {
-                throw new BuildException("Error accessing ServiceMix administration");
+                throw new BuildException("Error accessing ServiceMix administration", e);
             } else {
                 return;
             }
         }
         try {
+            log("Executing command", Project.MSG_DEBUG);
             doExecute(acs);
-        } catch (Exception e) {
-            log.error("Error executing task", e);
+        } catch (Throwable e) {
+            log("Error executing command: " + e.getMessage(), Project.MSG_WARN);
             if (isFailOnError()) {
-                throw new BuildException("Error accessing ServiceMix administration");
+                throw new BuildException("Error accessing ServiceMix administration", e);
             } else {
                 return;
             }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListBindingComponentsTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListBindingComponentsTask.java?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListBindingComponentsTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListBindingComponentsTask.java
Thu Mar  9 03:01:34 2006
@@ -17,6 +17,7 @@
 
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 
 /**
  * ListBindingComponentsTask
@@ -101,7 +102,7 @@
      */
     public void doExecute(AdminCommandsServiceMBean acs) throws Exception {
         String result = acs.listComponents(true, false, true, getState(), getSharedLibraryName(),
getServiceAssemblyName());
-        System.out.println(result);
+        log(result, Project.MSG_WARN);
     }
     
 }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceAssembliesTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceAssembliesTask.java?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceAssembliesTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceAssembliesTask.java
Thu Mar  9 03:01:34 2006
@@ -17,6 +17,7 @@
 
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 
 /**
  * List deployed Service Assemblies
@@ -84,7 +85,7 @@
      */
     public void doExecute(AdminCommandsServiceMBean acs) throws Exception {
         String result = acs.listServiceAssemblies(getState(), getComponentName(), getServiceAssemblyName());
-        System.out.println(result);
+        log(result, Project.MSG_WARN);
     }
     
 }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceEnginesTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceEnginesTask.java?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceEnginesTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListServiceEnginesTask.java
Thu Mar  9 03:01:34 2006
@@ -17,6 +17,7 @@
 
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 
 /**
  * ListServiceEnginesTask
@@ -85,7 +86,7 @@
      */
     public void doExecute(AdminCommandsServiceMBean acs) throws Exception {
         String result = acs.listComponents(false, true, true, getState(), getSharedLibraryName(),
getServiceAssemblyName());
-        System.out.println(result);
+        log(result, Project.MSG_WARN);
     }
 
 }

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListSharedLibrariesTask.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListSharedLibrariesTask.java?rev=384488&r1=384487&r2=384488&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListSharedLibrariesTask.java
(original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/management/task/ListSharedLibrariesTask.java
Thu Mar  9 03:01:34 2006
@@ -17,6 +17,7 @@
 
 import org.apache.servicemix.jbi.framework.AdminCommandsServiceMBean;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 
 /**
  * ListSharedLibrariesTask
@@ -67,7 +68,7 @@
      */
     public void doExecute(AdminCommandsServiceMBean acs) throws Exception {
         String result = acs.listSharedLibraries(getComponentName(), getSharedLibraryName());
-        System.out.println(result);
+        log(result, Project.MSG_WARN);
     }
     
 }



Mime
View raw message