[jboss-svn-commits] JBL Code SVN: r32996 - in labs/jbossrules/trunk/install: db/driver and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri May 21 12:38:05 EDT 2010


Author: KrisVerlaenen
Date: 2010-05-21 12:38:04 -0400 (Fri, 21 May 2010)
New Revision: 32996

Added:
   labs/jbossrules/trunk/install/build.properties
Modified:
   labs/jbossrules/trunk/install/build.xml
   labs/jbossrules/trunk/install/db/driver/
   labs/jbossrules/trunk/install/lib/
   labs/jbossrules/trunk/install/readme.txt
Log:
 - updated install script

Added: labs/jbossrules/trunk/install/build.properties
===================================================================
--- labs/jbossrules/trunk/install/build.properties	                        (rev 0)
+++ labs/jbossrules/trunk/install/build.properties	2010-05-21 16:38:04 UTC (rev 32996)
@@ -0,0 +1,11 @@
+# the home of your JBoss AS 4.2.3.GA installation
+jboss.home=C:/jboss-4.2.3.GA
+
+# defines which server configuration should be used
+# for example, if you specify 'default', the application
+# will be deployed to ${jboss.home}/server/default/deploy
+jboss.server.configuration=default
+
+# the home of your eclipse installation
+# will be used to deploy the Eclipse plugin to
+eclipse.home=C:/Progra~1/eclipse-3.5.SR1
\ No newline at end of file

Modified: labs/jbossrules/trunk/install/build.xml
===================================================================
--- labs/jbossrules/trunk/install/build.xml	2010-05-21 14:12:25 UTC (rev 32995)
+++ labs/jbossrules/trunk/install/build.xml	2010-05-21 16:38:04 UTC (rev 32996)
@@ -2,19 +2,19 @@
 
 <project name="drools.install">
 
+  <property file="build.properties" />
+
   <property name="drools.version" value="5.1.0.SNAPSHOT" />
   <property name="drools.home" value="../" />
-
-  <property name="jboss.home" value="/NotBackedUp/jboss-4.2.3.GA" />
-  <property name="jboss.server.configuration" value="default" />
   <property name="jboss.server.conf.dir" value="${jboss.home}/server/${jboss.server.configuration}/conf" />
   <property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />
   <property name="jboss.server.deploy.dir" value="${jboss.home}/server/${jboss.server.configuration}/deploy" />
   <property name="jboss.server.lib.dir" value="${jboss.home}/server/${jboss.server.configuration}/lib" />
   <property name="jboss.server.birt.dir" value="${jboss.server.data.dir}/birt"/>
+  <property name="eclipse.workspace.dir" value="${drools.home}/install/sample/workspace"/>
+  <property name="h2.download.url" value="http://repository.jboss.org/maven2/com/h2database/h2/1.2.124/h2-1.2.124.jar"/>
+  <property name="birt.download.url" value="http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-2_3_2_2-200906011507/birt-runtime-2_3_2_2.zip&amp;url=http://download.eclipse.org/birt/downloads/drops/R-R1-2_3_2_2-200906011507/birt-runtime-2_3_2_2.zip&amp;mirror_id=1"/>
 
-  <property name="eclipse.home" value="/NotBackedUp/eclipse" />
-
   <target name="install.guvnor.into.jboss" 
           description="Installs Drools Guvnor into JBoss">
     <copy file="${drools.home}/drools-guvnor/target/drools-guvnor.war"
@@ -22,7 +22,37 @@
           overwrite="true" />
   </target>
 
-  <target name="install.drools-gwt-console.into.jboss" 
+  <target name="download.h2.check">
+     <echo message="Checking h2 ..." />
+     <condition property="h2.not.available">
+       <not>
+         <available file="${drools.home}/install/db/driver/h2.jar" />
+       </not>
+     </condition>
+  </target> 
+
+  <target name="download.h2" depends="download.h2.check" if="h2.not.available">
+     <echo message="Getting h2 ..." />
+     <mkdir dir="${drools.home}/install/db/driver"/>
+     <get src="${h2.download.url}" dest="${drools.home}/install/db/driver/h2.jar" />
+  </target>
+
+  <target name="download.birt.check">
+     <echo message="Checking birt reporting engine ..." />
+     <condition property="birt.not.available">
+       <not>
+         <available file="${drools.home}/install/lib/birt-runtime-2_3_2_2.zip" />
+       </not>
+     </condition>
+  </target> 
+
+  <target name="download.birt" depends="download.birt.check" if="birt.not.available">
+     <echo message="Getting birt reporting engine ..." />
+     <mkdir dir="${drools.home}/install/lib"/>
+     <get src="${birt.download.url}" dest="${drools.home}/install/lib/birt-runtime-2_3_2_2.zip" />
+  </target>
+
+  <target name="install.drools-gwt-console.into.jboss" depends="download.h2,download.birt"
           description="Installs Drools gwt-console into JBoss">
     <!-- gwt-console -->
     <mkdir dir="${drools.home}/install/target"/>
@@ -36,7 +66,7 @@
           tofile="${drools.home}/install/target/drools-gwt-server-war/WEB-INF/classes/META-INF/persistence.xml"
           overwrite="true" />
     <!-- Fix for conflicting javassist jar -->
-    <delete file="${drools.home}/install/target/drools-gwt-server-war/WEB-INF/lib/javassist-3.6.0.GA.jar"/>
+    <delete file="${drools.home}/install/target/drools-gwt-server-war/WEB-INF/lib/javassist-3.6.0.GA.jar"/>
     <!-- Other configuration like work item handlers -->
     <copy todir="${drools.home}/install/target/drools-gwt-server-war/WEB-INF/classes" overwrite="true">
       <fileset dir="${drools.home}/install/conf"/>
@@ -105,4 +135,81 @@
     </copy>
   </target>
 
-</project>
+  <target name="start.h2" depends="download.h2">
+    <java classname="org.h2.tools.Server" fork="true" spawn="true">
+      <arg value="-tcp" />
+      <classpath location="${drools.home}/install/db/driver/h2.jar" />
+    </java>
+    
+  </target>
+
+  <target name="stop.h2" depends="download.h2">
+    <java classname="org.h2.tools.Server" fork="true">
+      <classpath location="${drools.home}/install/db/driver/h2.jar" />
+      <arg value="-tcpShutdown" />
+      <arg value="tcp://localhost:9092" />
+    </java>
+  </target>
+
+  <target name="start.jboss">
+    <exec executable="${jboss.home}/bin/run.bat"
+          spawn="yes"
+          os="Windows 7,Windows Vista,Windows XP,Windows 2000">
+      <arg value="-b" />
+      <arg value="${jboss.bind.address}" />
+    </exec>
+    <exec executable="${jboss.home}/bin/run.sh" spawn="yes" os="Linux,Mac OS X">
+      <arg value="-b" />
+      <arg value="${jboss.bind.address}" />
+    </exec>
+    <waitfor maxwait="5" maxwaitunit="minute" checkevery="30" checkeveryunit="second"
+      timeoutproperty="jboss.timeout">
+      <socket server="${jboss.bind.address}" port="8080" />
+    </waitfor>
+    <fail if="jboss.timeout" message="jboss did not start within 5 minutes"/>
+  </target>
+
+  <target name="stop.jboss"
+          description="signals jboss to stop, but doesn't wait till its finished">
+    <exec executable="${jboss.home}/bin/shutdown.bat"
+          os="Windows 7,Windows Vista,Windows XP,Windows 2000">
+      <arg value="-s" />
+      <arg value="jnp://${jboss.bind.address}:1099" />
+      <arg value="-S" />
+    </exec>
+    <exec executable="${jboss.home}/bin/shutdown.sh" os="Linux,Mac OS X">
+      <arg value="-s" />
+      <arg value="jnp://${jboss.bind.address}:1099" />
+      <arg value="-S" />
+    </exec>
+  </target>
+
+  <target name="start.eclipse" description="starts eclipse">
+    <!-- Windows -->
+    <exec executable="${eclipse.home}/eclipse.exe"
+          spawn="yes"
+          os="Windows 7,Windows Vista,Windows XP,Windows 2000">
+      <arg value="-data" />
+      <arg value="${eclipse.workspace.dir}" />
+    </exec>
+    <!-- Unix -->
+    <chmod perm="+x">
+      <fileset dir="${eclipse.home}">
+        <filename name="eclipse" />
+      </fileset>
+      <!-- Path is different for OS X -->
+      <fileset dir="${eclipse.home}/Eclipse.app/Contents/MacOS/">
+        <filename name="eclipse" />
+      </fileset>
+    </chmod>
+    <exec executable="${eclipse.home}/eclipse" os="Linux">
+      <arg value="-data" />
+      <arg value="${eclipse.workspace.dir}" />
+    </exec>
+    <exec executable="${eclipse.home}/Eclipse.app/Contents/MacOS/eclipse" os="Mac OS X">
+      <arg value="-data" />
+      <arg value="${eclipse.workspace.dir}" />
+    </exec>
+  </target>
+
+</project>


Property changes on: labs/jbossrules/trunk/install/db/driver
___________________________________________________________________
Name: svn:ignore
   + *.jar



Property changes on: labs/jbossrules/trunk/install/lib
___________________________________________________________________
Name: svn:ignore
   + birt-runtime-2_3_2_2.zip


Modified: labs/jbossrules/trunk/install/readme.txt
===================================================================
--- labs/jbossrules/trunk/install/readme.txt	2010-05-21 14:12:25 UTC (rev 32995)
+++ labs/jbossrules/trunk/install/readme.txt	2010-05-21 16:38:04 UTC (rev 32996)
@@ -4,7 +4,7 @@
 (if it is the first time you do this, this could take a while as it will be downloading eclipse as part of the installation, you can remove the -Declipse part if you're not interested in the Eclipse plugin)
 
 Download and install JBoss AS version 4.2.3.GA
-In install/build.xml, change <property name="jboss.home" value="C:/jboss-4.2.3.GA" /> to the location of your JBoss AS installation
+In install/build.properties, change the jboss.home property to the location of your JBoss AS installation
 
 Increase the memory that can be used by the application server (especially the PermGen space). To do so,
 On linux: 
@@ -17,7 +17,7 @@
   set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=256m
 
 Download Eclipse 3.5.1
-In build.xml, change <property name="eclipse.home" value="C:/Progra~1/eclipse-3.5.1" /> to the location of your Eclipse installation
+In install/build.properties, change the eclipse.home property to the location of your Eclipse installation
 
 Update datasource configuration if necessary (uses h2 in memory database by default).
 [You don't need to change anything to these files if you just want to use this default configuration]
@@ -26,11 +26,8 @@
 install/db/hibernate.cfg.xml
 
 Put database driver jar in install/db/driver directory (e.g. h2-1.1.117.jar, create the driver dir if necessary)
+By default, it will download the h2.jar.
 
-Down BIRT report engine
-http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-2_3_2_2-200906011507/birt-runtime-2_3_2_2.zip
-and put it in install/lib dir (create the lib dir if necessary)
-
 in the install dir, run installation script:
 ant install.guvnor.into.jboss
 ant install.drools-gwt-console.into.jboss



More information about the jboss-svn-commits mailing list