[jboss-svn-commits] JBL Code SVN: r8976 - in labs/jbossesb/trunk/product: core/listeners and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jan 22 14:44:36 EST 2007


Author: kurt.stam at jboss.com
Date: 2007-01-22 14:44:36 -0500 (Mon, 22 Jan 2007)
New Revision: 8976

Added:
   labs/jbossesb/trunk/product/core/listeners/src/jboss-service-dependencies.xml
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesService.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesServiceMBean.java
Modified:
   labs/jbossesb/trunk/product/build.xml
   labs/jbossesb/trunk/product/core/listeners/build.xml
   labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml
   labs/jbossesb/trunk/product/install/build.xml
   labs/jbossesb/trunk/product/install/deployment.properties-example
Log:
Changing the build: 

1. We now have 2 sar files. This to solve Linkage errors using xpath (in the rules).

2. Added flag to enable just the deployment of the sars and not the configuration. 
By default the jboss configuration is still deployed.

Modified: labs/jbossesb/trunk/product/build.xml
===================================================================
--- labs/jbossesb/trunk/product/build.xml	2007-01-22 19:41:14 UTC (rev 8975)
+++ labs/jbossesb/trunk/product/build.xml	2007-01-22 19:44:36 UTC (rev 8976)
@@ -374,7 +374,7 @@
 	</target>
 
 	<target name="deploy" depends="jar">
-		<ant dir="install" target="configure"/>
+		<ant dir="install" target="jboss.sar.deploy"/>
 	</target>
 
 	<target name="instr-report">

Modified: labs/jbossesb/trunk/product/core/listeners/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/build.xml	2007-01-22 19:41:14 UTC (rev 8975)
+++ labs/jbossesb/trunk/product/core/listeners/build.xml	2007-01-22 19:44:36 UTC (rev 8976)
@@ -2,6 +2,7 @@
 <project name="BuildJbossEsbListeners" default="org.jboss.esb.listeners.compile" basedir=".">
 
 	<property name="org.jboss.esb.listeners.jar.name" value="jbossesb-listeners"/>
+	<property name="org.jboss.esb.dependencies.jar.name" value="jbossesb-dependencies"/>
 	<property name="org.jboss.esb.listeners.distrib.dir" location="${org.jboss.esb.internal.dest}/jbossesb"/>
 	<property name="org.jboss.esb.listeners.classes.dir" location="${org.jboss.esb.internal.dest}/classes/listeners"/>
     <property name="org.jboss.esb.listeners.src.dir" location="src"/>
@@ -15,7 +16,7 @@
 	</condition>
 	
 	<path id="org.jboss.esb.listeners.base.classpath">
-        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="xbean.jar,jsr173_1.0_api.jar"/>
+        <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="stax-api-1.0.1.jar,xalan.jar,xbean.jar"/>
 		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
     </path>
 
@@ -97,9 +98,15 @@
         <jar    destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar" 
                 basedir="${org.jboss.esb.listeners.classes.dir}" 
                 includes="**/*.class"
-		        excludes="test/**"
+		        excludes="test/**,**/dependencies/*.class"
                 />
     	
+    	<jar    destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.jar" 
+    	                basedir="${org.jboss.esb.listeners.classes.dir}" 
+    	                includes="**/dependencies/*.class"
+    			        excludes="test/**"
+    	                />
+    				
     	<echo message="Building JBoss ESB sar file"/>
     			<delete dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar" />
     			<mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar" />
@@ -107,26 +114,34 @@
     			<copy file="${org.jboss.esb.listeners.src.dir}/jboss-service.xml" 
     				todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar/META-INF"/>
     			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar">
-    				<fileset dir="${org.jboss.esb.listeners.distrib.dir}/lib" includes="jbossesb*.jar"/></copy>
+    				<fileset dir="${org.jboss.esb.listeners.distrib.dir}/lib" includes="jbossesb*.jar"
+    					excludes="${org.jboss.esb.dependencies.jar.name}.jar" /></copy>
     			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb.sar">
-    				<!-- xbean for reading/marchallinng the configuration -->
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xbean.jar,stax-api-1.0.1.jar,xmlpublic.jar"/>
     				<!-- scout and juddi -->
     				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="commons-discovery.jar,jbossts-common.jar,
     				jaxr-api-1.0-SNAPSHOT.jar,scout-1.0-SNAPSHOT.jar,juddi-1.0-SNAPSHOT.jar"/>
-    				<!-- xerces for validation
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xercesImpl-2.7.1.jar"/>  -->
+    			</copy>
+    	
+    	<echo message="Building JBoss ESB dependencies sar file"/>
+    			<delete dir="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.sar" />
+    			<mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.sar" />
+    			<mkdir dir="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.sar/META-INF" />
+    			<copy file="${org.jboss.esb.listeners.src.dir}/jboss-service-dependencies.xml" 
+    	    	  tofile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.sar/META-INF/jboss-service.xml"/>
+    			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.sar">
+    	    	   <fileset dir="${org.jboss.esb.listeners.distrib.dir}/lib" includes="${org.jboss.esb.dependencies.jar.name}.jar"/></copy>    			
+    			<copy todir="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.sar">
+    				<!-- xbean for reading/marchallinng the configuration -->
+    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xbean.jar,stax-api-1.0.1.jar,xmlpublic.jar"/>
     				<!-- jboss rules for CBR -->
     				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="antlr-3.0ea8.jar,antlr-2.7.6.jar,
     				core-3.2.0.666.jar,drools-compiler-3.0.4.jar,drools-core-3.0.4.jar,stringtemplate-2.3b6.jar,
     				commons-jci-core-1.0-406301.jar,commons-jci-eclipse-3.2.0.666.jar"/>
-    				<!-- xpath for rules 
-    				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="xalan-2.7.0.jar"/> -->
     				<!-- smooks for transformation -->
     				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="milyn-commons-0.8-SNAPSHOT.jar,
     			    milyn-smooks-core-0.8-SNAPSHOT.jar,milyn-smooks-javabean-0.1.1.jar,milyn-smooks-misc-0.2.jar,
     				milyn-smooks-templating-0.2.jar,milyn-tinak-0.7.1.jar,
-    				commons-lang-2.1.jar,commons-logging.jar"/>
+    				commons-lang-2.1.jar"/>
     				<!-- ftp -->
     				<fileset dir="${org.jboss.esb.ext.lib.dir}/" includes="edtftpj.jar"/>
     			</copy>

Added: labs/jbossesb/trunk/product/core/listeners/src/jboss-service-dependencies.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/jboss-service-dependencies.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/jboss-service-dependencies.xml	2007-01-22 19:44:36 UTC (rev 8976)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+    <mbean code="org.jboss.internal.soa.esb.dependencies.JBossESBDependenciesService" 
+        name="jboss.org:service=JBossESBDependencies"
+        description="Container for the JBossESB Dependencies">
+    </mbean>
+</server>
\ No newline at end of file

Modified: labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml	2007-01-22 19:41:14 UTC (rev 8975)
+++ labs/jbossesb/trunk/product/core/listeners/src/jboss-service.xml	2007-01-22 19:44:36 UTC (rev 8976)
@@ -6,6 +6,7 @@
   	     name="jboss.org:service=ConfigurationController"
   	     description="Configuration controller which generated the config files for the listener and gateway controllers">
     <attribute name="ConfigurationFile">jbossesb.xml</attribute>
+    <depends>jboss.org:service=JBossESBDependencies</depends>
     <depends>jboss.org:service=JuddiRMI</depends>
   </mbean>
   <!--  Starts the listener controler -->
@@ -13,6 +14,7 @@
   	     name="jboss.org:service=ListenerManager"
   	     description="ESB Aware Listener">
     <attribute name="MessageAwareConfigFile">jbossesb-listener.xml</attribute>
+    <depends>jboss.org:service=JBossESBDependencies</depends>
     <depends>jboss.org:service=ConfigurationController</depends>
     <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
   </mbean>
@@ -21,6 +23,7 @@
          name="jboss.org:service=GatewayListenerController"
          description="Gateway Listener">
     <attribute name="GatewayConfigFile">jbossesb-gateway.xml</attribute>
+    <depends>jboss.org:service=JBossESBDependencies</depends>
     <depends>jboss.jca:service=DataSourceBinding,name=JBossESBDS</depends>
     <depends>jboss.org:service=ListenerManager</depends>
   </mbean>
@@ -28,6 +31,7 @@
   <mbean code="org.jboss.soa.esb.listeners.JuddiRMIService" 
          name="jboss.org:service=JuddiRMI"
          description="Juddi RMI Service">
+    <depends>jboss.org:service=JBossESBDependencies</depends>
     <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
   </mbean>
   <loader-repository>

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesService.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesService.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesService.java	2007-01-22 19:44:36 UTC (rev 8976)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.dependencies;
+
+import org.apache.log4j.Logger;
+import org.jboss.system.ServiceMBeanSupport;
+/**
+ * An 'empty' service to 
+ * 
+ * @author Kurt Stam
+ *
+ */
+public class JBossESBDependenciesService extends ServiceMBeanSupport implements JBossESBDependenciesServiceMBean
+{
+	private Logger log = Logger.getLogger(this.getClass());
+	/**
+	 * Let's the jbossesb classloader know that the de
+	 */
+	protected void startService() throws Exception 
+	{
+		log.info("The JBossESB dependencies are deployed.");
+	}
+	/**
+	 * Stops the gateways.
+	 */
+	protected void stopService() throws Exception 
+	{
+        log.info("Undeploying the JBossESB dependencies..");
+	}
+}

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesServiceMBean.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/internal/soa/esb/dependencies/JBossESBDependenciesServiceMBean.java	2007-01-22 19:44:36 UTC (rev 8976)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.internal.soa.esb.dependencies;
+
+import org.jboss.system.ServiceMBean;
+/**
+ * 
+ * @author Kurt Stam
+ *
+ */
+public interface JBossESBDependenciesServiceMBean extends ServiceMBean
+{
+}

Modified: labs/jbossesb/trunk/product/install/build.xml
===================================================================
--- labs/jbossesb/trunk/product/install/build.xml	2007-01-22 19:41:14 UTC (rev 8975)
+++ labs/jbossesb/trunk/product/install/build.xml	2007-01-22 19:44:36 UTC (rev 8976)
@@ -1,4 +1,4 @@
-<project name="JBESB_Config" default="configure.jboss" basedir=".">
+<project name="JBESB_Config" default="configure" basedir=".">
 
 	<!-- Set deployment properties filename -->
 	<property name="org.jboss.esb.deployment.properties" location="deployment.properties"/>
@@ -10,14 +10,15 @@
 	<property name="org.jboss.esb.deployment.data" location="data"/>
 	
 	<target name="configure" depends="configure.jboss" />
-	<target name="configure.jboss">
+	<target name="configure.jboss" depends="check.config.jboss" unless="config.jboss.isset">
+		
 		<!-- conf -->
 		<copy  file="${org.jboss.esb.deployment.conf}/log4j.xml" overwrite="true"
-			           todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
 		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-properties.xml" overwrite="true"
-				       todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
 		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb.xml" overwrite="true"
-					   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
+			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
 		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-gateway.xml" overwrite="true"
 		       todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/conf" />
 		<copy  file="${org.jboss.esb.deployment.conf}/jbossesb-listener.xml" overwrite="true"
@@ -34,9 +35,21 @@
 		<!-- deploy -->
 		<copy  file="${org.jboss.esb.deployment.deploy}/hsqldb-ds.xml" overwrite="true"
 			   todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy" />
+	</target>
+	
+	<!--  Check if the user wants to deploy the config  -->
+	<target name="check.config.jboss">
+		<condition property="config.jboss.isset">
+			<equals arg1="${org.jboss.esb.config.saronly.set}" arg2="true" trim="true"/>
+		</condition>
+	</target>
+	
+	<target name="jboss.sar.deploy" depends="configure.jboss">
 		<copy  todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
+			<fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb-dependencies.sar/**"/></copy>
+		<copy  todir="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy">
 			<fileset dir="${org.jboss.esb.dist.lib}" includes="jbossesb.sar/**"/></copy>
-			  
+		<touch file="${org.jboss.esb.appserver.home}/server/${org.jboss.esb.appserver.config}/deploy/jbossesb.sar/META-INF/jboss-service.xml"/>
 	</target>
-	
+
 </project>

Modified: labs/jbossesb/trunk/product/install/deployment.properties-example
===================================================================
--- labs/jbossesb/trunk/product/install/deployment.properties-example	2007-01-22 19:41:14 UTC (rev 8975)
+++ labs/jbossesb/trunk/product/install/deployment.properties-example	2007-01-22 19:44:36 UTC (rev 8976)
@@ -16,4 +16,9 @@
 # Note: You should not need to change this entry unless you altered
 # the jbossesb distribution directory structure, however if you check out from SVN you will 
 # have to run the 'ant dist' target to build these jars.
-org.jboss.esb.dist.lib=../lib
\ No newline at end of file
+org.jboss.esb.dist.lib=../lib
+
+# if at a later stage you don't want to redeploy the config anymore
+# with every deploy, but rather the sar only (not the configuration)
+# then uncomment the following
+#org.jboss.esb.config.saronly.set=true
\ No newline at end of file




More information about the jboss-svn-commits mailing list