[jboss-svn-commits] JBL Code SVN: r10838 - in labs/jbossrules/trunk/drools-eclipse: drools-eclipse-plugin and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Apr 9 20:01:53 EDT 2007


Author: mark.proctor at jboss.com
Date: 2007-04-09 20:01:53 -0400 (Mon, 09 Apr 2007)
New Revision: 10838

Added:
   labs/jbossrules/trunk/drools-eclipse/setupEclipse.xml
Modified:
   labs/jbossrules/trunk/drools-eclipse/allElements.xml
   labs/jbossrules/trunk/drools-eclipse/build.properties
   labs/jbossrules/trunk/drools-eclipse/customTargets.xml
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/.classpath
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/META-INF/MANIFEST.MF
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/build.properties
   labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/test.xml
   labs/jbossrules/trunk/drools-eclipse/pom.xml
Log:
JBRULES-761 Automate the Eclipse build
-first fully working pde automation, simply use "mvn install"

Modified: labs/jbossrules/trunk/drools-eclipse/allElements.xml
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/allElements.xml	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/allElements.xml	2007-04-10 00:01:53 UTC (rev 10838)
@@ -1,5 +1,4 @@
 <project name="allElements Delegator">
-
  	<!-- ===================================================================== -->
  	<!-- Run a given ${target} on all elements being built                     -->
  	<!-- Replace element.id with the id of the top level element being built.    -->
@@ -9,15 +8,22 @@
  	<!-- Add on <ant> task for each top level element being built.             -->
  	<!-- ===================================================================== -->
  	<target name="allElementsDelegator">
+    <antcall target="org.drools.eclipse.feature"  />
+    <antcall target="org.drools.eclipse.test-feature"  />
+ 	</target>
+
+ 	<target name="org.drools.eclipse.feature" if="mavenCompilePhase">
  		<ant antfile="${genericTargets}" target="${target}">
 	 		<property name="type" value="feature" />
 	 		<property name="id" value="org.drools.eclipse.feature" />
  		</ant>
- 		
+ 	</target>
+
+ 	<target name="org.drools.eclipse.test-feature" if="mavenTestPhase">
  		<ant antfile="${genericTargets}" target="${target}">
 	 		<property name="type" value="feature" />
 	 		<property name="id" value="org.drools.eclipse.test-feature" />
- 		</ant> 		
+ 		</ant>
  	</target>
 
  	<!-- ===================================================================== -->
@@ -31,9 +37,9 @@
  		<property name="archiveName" value="${zipFile}"/>
  		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
  	</target>
- 	
+
  	<target name="assemble.org.drools.eclipse.test-feature">
  		<property name="archiveName" value="${testZipFile}"/>
  		<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
- 	</target> 	
+ 	</target>
 </project>

Modified: labs/jbossrules/trunk/drools-eclipse/build.properties
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/build.properties	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/build.properties	2007-04-10 00:01:53 UTC (rev 10838)
@@ -1,107 +1,23 @@
-###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-#####################
-# Parameters describing how and where to execute the build.
-# Typical users need only update the following properties:
-#    baseLocation - where things you are building against are installed
-#    bootclasspath - The base jars to compile against (typicaly rt.jar)
-#    configs - the list of {os, ws, arch} configurations to build.
-#
-# Of course any of the settings here can be overridden by spec'ing
-# them on the command line (e.g., -DbaseLocation=d:/eclipse
-
-############# PRODUCT/PACKAGING CONTROL #############
-product=/plugin or feature id/path/to/.product
+#product=/plugin or feature id/path/to/.product
 runPackager=true
-
 jbossRulesVersion=3.1.0.M1
 
-##sets the zip name
-zipFile=jbossrules-eclipse-${jbossRulesVersion}.zip
-testZipFile=jbossrules-eclipse-test-${jbossRulesVersion}.zip
-
-#Set the name of the archive that will result from the product build.
-#archiveNamePrefix=
-
 # The prefix that will be used in the generated archive.
 archivePrefix=
-
 # The location underwhich all of the build output will be collected.
 collectingFolder=${archivePrefix}
 
-# The list of {os, ws, arch} configurations to build.  This
-# value is a '&' separated list of ',' separate triples.  For example,
-#     configs=win32,win32,x86 & linux,motif,x86
-# By default the value is *,*,*
-#configs=win32, win32, x86 & \
-#	linux, gtk, ppc &\
-# linux, gtk, x86 & \
-#	linux, gtk, x86_64 & \
-#	linux, motif, x86 & \
-#	solaris, motif, sparc & \
-#	solaris, gtk, sparc & \
-#	aix, motif, ppc & \
-#	hpux, motif, PA_RISC & \
-#	macosx, carbon, ppc
+##sets the zip name
+zipFile=jbossrules-eclipse-${jbossRulesVersion}.zip
+testZipFile=jbossrules-eclipse-test-${jbossRulesVersion}.zip
 
-# By default PDE creates one archive (result) per entry listed in the configs property.
-# Setting this value to try will cause PDE to only create one output containing all
-# artifacts for all the platforms listed in the configs property.
-#groupConfigurations=true
-
-#The format of the archive. By default a zip is created using antZip.
-#The list can only contain the configuration for which the desired format is different than zip.
-#archivesFormat=win32, win32, x86 - antZip& \
-#	linux, gtk, ppc - antZip &\
-#    linux, gtk, x86 - antZip& \
-#	linux, gtk, x86_64 - antZip& \
-# linux, motif, x86 - antZip& \
-#	solaris, motif, sparc - antZip& \
-#	solaris, gtk, sparc - antZip& \
-#	aix, motif, ppc - antZip& \
-#	hpux, motif, PA_RISC - antZip& \
-#	macosx, carbon, ppc - antZip
-
 #Set to true if you want the output to be ready for an update jar (no site.xml generated)
 outputUpdateJars = false
 
-#Set to true for Jnlp generation
-#codebase should be a URL that will be used as the root of all relative URLs in the output.
-#generateJnlp=false
-#jnlp.codebase=<codebase url>
-#jnlp.j2se=<j2se version>
 
-#Set to true if you want to sign jars
-#signJars=false
-#sign.alias=<alias>
-#sign.keystore=<keystore location>
-#sign.storepass=<keystore password>
+# Timestamp for the build.  Used in naming the build output
+timestamp=007
 
-#Arguments to send to the zip executable
-zipargs=
-
-#Arguments to send to the tar executable
-tarargs=
-
-#Control the creation of a file containing the version included in each configuration - on by default
-#generateVersionsLists=false
-
-############## BUILD NAMING CONTROL ################
-##Where the customised scripts live
-builder=.
-
-# The directory into which the build elements are fetched and where
-# the build takes place.
-buildDirectory=${builder}/target/eclipse.build
-
 # Type of build.  Used in naming the build output.  Typically this value is
 # one of I, N, M, S, ...
 buildType=N
@@ -112,94 +28,27 @@
 # Label for the build.  Used in naming the build output
 buildLabel=${buildType}.${buildId}
 
-# Timestamp for the build.  Used in naming the build output
-timestamp=007
-
-#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
-#The value will only be applied to plugin or features indicating build.properties, qualifier = context
-#forceContextQualifier=<the value for the qualifier>
-
-#Enable / disable the generation of a suffix for the features that use .qualifier.
-#The generated suffix is computed according to the content of the feature
-#generateFeatureVersionSuffix=true
-
-############# BASE CONTROL #############
-# Settings for the base Eclipse components and Java class libraries
-# against which you are building.
-# Base location for anything the build needs to compile against.  For example,
-# in most RCP app or a plug-in,  the baseLocation should be the location of a previously
-# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
-
+#Where the customised scripts live
+builder=.
 base=${builder}/target
+buildDirectory=${base}/eclipse.build
 baseLocation=${base}/eclipse
-#Os/Ws/Arch/nl of the eclipse specified by baseLocation
-baseos=win32
-basews=win32
-basearch=x86
 
-#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
-#a location is one of:
-#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
-#- a directory that contains a /plugins or /features subdirectory
-#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
-#pluginPath=
 
-#skipBase=true
-eclipseGefURL=http://download.eclipse.org//tools/gef/downloads/drops/R-3.2.2-200702081315
-eclipseURL=http://download.eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+#baseos=win32
+#basews=win32
+#basearch=x86
+
+eclipseGefURL=http://download.eclipse.org//tools/gef/downloads/drops
+eclipseURL=http://download.eclipse.org/eclipse/downloads/drops
+eclipseBuildRevision=R-3.2.2-200702121330
+eclipseGefBuildRevision=R-3.2.2-200702081315
 eclipseBuildId=3.2.2
-#eclipseBaseURL=${eclipseURL}/eclipse-${eclipseBuildId}-win32.zip
 
-
-############# MAP FILE CONTROL ################
-# This section defines CVS tags to use when fetching the map files from the repository.
-# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
-
-skipMaps=true
-mapsRepo=:pserver:anonymous at example.com/path/to/repo
-mapsRoot=path/to/maps
-mapsCheckoutTag=HEAD
-
-#tagMaps=true
-mapsTagTag=v${buildId}
-
-
-############ REPOSITORY CONTROL ###############
-# This section defines properties parameterizing the repositories where plugins, fragments
-# bundles and features are being obtained from.
-
-# The tags to use when fetching elements to build.
-# By default thebuilder will use whatever is in the maps.
-# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the
-# overriding value
-# For example fetchTag=CVS=HEAD, SVN=v20050101
-# fetchTag=HEAD
+# We don't want any SCM automation
 skipFetch=true
 
-
-############# JAVA COMPILER OPTIONS ##############
-# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
-#bootclasspath=${java.home}/lib/rt.jar
-
-# specific JRE locations to compile against. These values are used to compile bundles specifying a
-# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
-#CDC-1.0/Foundation-1.0= /path/to/rt.jar
-#CDC-1.1/Foundation-1.1=
-#OSGi/Minimum-1.0=
-#OSGi/Minimum-1.1=
-#JRE-1.1=
-#J2SE-1.2=
-#J2SE-1.3=
-#J2SE-1.4=
-#J2SE-1.5=
-#JavaSE-1.6=
-#PersonalJava-1.1=
-#PersonalJava-1.2=
-#CDC-1.0/PersonalBasis-1.0=
-#CDC-1.0/PersonalJava-1.0=
-#CDC-1.1/PersonalBasis-1.1=
-#CDC-1.1/PersonalJava-1.1=
-
 # Specify the output format of the compiler log when eclipse jdt is used
 logExtension=.log
 
@@ -207,7 +56,7 @@
 javacDebugInfo=false
 
 # Whether or not to fail the build if there are compiler errors
-javacFailOnError=true
+javacFailOnError=false
 
 # Enable or disable verbose mode of the compiler
 javacVerbose=true
@@ -216,9 +65,9 @@
 #compilerArg=
 
 # Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
-#javacSource=1.3
+javacSource=1.4
 
 # Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
-#javacTarget=1.1
+javacTarget=1.4
 
 

Modified: labs/jbossrules/trunk/drools-eclipse/customTargets.xml
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/customTargets.xml	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/customTargets.xml	2007-04-10 00:01:53 UTC (rev 10838)
@@ -1,5 +1,4 @@
 <project name="Build specific targets and properties" default="noDefault">
-
 	<!-- ===================================================================== -->
 	<!-- Run a given ${target} on all elements being built -->
 	<!-- Add on <ant> task for each top level element being built. -->
@@ -12,26 +11,6 @@
 
 	<!-- ===================================================================== -->
 	<!-- ===================================================================== -->
-	<target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
-		<get usetimestamp="true" src="${eclipseURL}/eclipse-SDK-${eclipseBuildId}-win32.zip" dest="${buildDirectory}/../eclipse-SDK-${eclipseBuildId}-win32.zip" />
-		<unzip dest="${base}" overwrite="true" src="${buildDirectory}/../eclipse-SDK-${eclipseBuildId}-win32.zip" />
-		
-		<get usetimestamp="true" src="${eclipseGefURL}/GEF-runtime-${eclipseBuildId}.zip" dest="${buildDirectory}/../GEF-runtime-${eclipseBuildId}.zip" />
-		<unzip dest="${base}" overwrite="true" src="${buildDirectory}/../GEF-runtime-${eclipseBuildId}.zip" />		
-		
-    <get usetimestamp="true" src="${eclipseURL}/eclipse-test-framework-${eclipseBuildId}.zip"
-         dest="${buildDirectory}/../eclipse-test-framework-${eclipseBuildId}.zip"/>
-         
-    <unzip dest="${base}" overwrite="true"
-           src="${buildDirectory}/../eclipse-test-framework-${eclipseBuildId}.zip" />
-           
-  </target>
-
-	<target name="checkLocalBase">
-		<available file="${baseLocation}" property="skipBase" />
-	</target>
-
-	<!-- ===================================================================== -->
 	<!-- Check out map files from correct repository -->
 	<!-- Replace values for mapsCheckoutTag as desired. -->
 	<!-- ===================================================================== -->
@@ -72,23 +51,40 @@
 	<!-- Steps to do before setup -->
 	<!-- ===================================================================== -->
 	<target name="preSetup">
+	  <echo>preSetup</echo>	  
+    <!--cleanup -->
+    <delete file="${base}/eclipse/org.drools.eclipse*.xml" />
+    <delete dir="${base}/eclipse/test-workspace"/>
+    
+    <delete dir="${base}/eclipse/features/org.drools.eclipse.feature_${jbossRulesVersion}"/>
+    <delete dir="${base}/eclipse/features/org.drools.eclipse.test-feature_${jbossRulesVersion}"/>
+    
+    <delete file="${base}/eclipse/plugins/org.drools.eclipse_${jbossRulesVersion}.jar"/>
+    <delete dir="${base}/eclipse/plugins/org.drools.eclipse.test_${jbossRulesVersion}"/>            
 	</target>
 
 	<!-- ===================================================================== -->
 	<!-- Steps to do after setup but before starting the build proper -->
 	<!-- ===================================================================== -->
-	<target name="postSetup">
-		<antcall target="getBaseComponents" />
+	<target name="postSetup">		
 		<mkdir dir="${buildDirectory}/features"/>
 		<mkdir dir="${buildDirectory}/plugins"/>
-
+		
+		<antcall target="compilePostSetup" />
+		<antcall target="testPostSetup" />
+	</target>
+	
+	<target name="compilePostSetup" if="mavenCompilePhase">
 		<copy todir="${buildDirectory}/features/org.drools.eclipse.feature">
 			<fileset dir="${builder}/drools-eclipse-feature"/>
 		</copy>
 
 		<copy todir="${buildDirectory}/plugins/org.drools.eclipse">
 				<fileset dir="${builder}/drools-eclipse-plugin"/>
-		</copy>
+		</copy>		
+	</target>
+
+	<target name="testPostSetup" if="mavenTestPhase">
 		
 		<copy todir="${buildDirectory}/features/org.drools.eclipse.test-feature">
 			<fileset dir="${builder}/drools-eclipse-test-feature"/>
@@ -97,15 +93,6 @@
 		<copy todir="${buildDirectory}/plugins/org.drools.eclipse.test">
 				<fileset dir="${builder}/drools-eclipse-test"/>
 		</copy>		
-		<!--
-		<copy todir="${buildDirectory}/features/com.ibm.eclipse.shootout.tests">
-				<fileset dir="${builder}/../com.ibm.eclipse.shootout.tests-feature"/>
-		</copy>
-
-		<copy todir="${buildDirectory}/plugins/com.ibm.eclipse.shootout.tests">
-			<fileset dir="${builder}/../com.ibm.eclipse.shootout.tests"/>
-		</copy>
-		-->
 	</target>
 
 	<!-- ===================================================================== -->
@@ -166,7 +153,8 @@
 	<!-- ===================================================================== -->
 	<!-- Steps to do after  running package. -->
 	<!-- ===================================================================== -->
-	<target name="postPackage">
+	<target name="postPackage" if="mavenCompilePhase">
+	    <copy file="${buildDirectory}/${buildLabel}/jbossrules-eclipse-${jbossRulesVersion}.zip" tofile="${base}/jbossrules-eclipse-${jbossRulesVersion}.zip" />
 	</target>
 
 	<!-- ===================================================================== -->
@@ -180,25 +168,13 @@
 	<!-- ===================================================================== -->
 	<!-- Steps to do to test the build results -->
 	<!-- ===================================================================== -->
-  <target name="test" >
-    <!--cleanup -->
-    <delete file="${base}/eclipse/org.drools.eclipse*.xml" />
-    <delete dir="${base}/eclipse/test-workspace"/>
-
-    <delete dir="${base}/eclipse/plugins/org.drools.eclipse.test_${jbossRulesVersion}"/>
-    <delete file="${base}/eclipse/plugins/org.drools.eclipse_${jbossRulesVersion}.jar" />
-  
+  <target name="test" if="runTests">  
     <unzip src="${buildDirectory}/${buildLabel}/jbossrules-eclipse-${jbossRulesVersion}.zip"
            dest="${base}/eclipse"/>
     <unzip src="${buildDirectory}/${buildLabel}/jbossrules-eclipse-test-${jbossRulesVersion}.zip" 
            dest="${base}/eclipse"/>    
-<!-- pom: no need to do that now that the drools eclipse is properly configured 
-          to be jarred in its manifest and build.properties
-    <mkdir  dir="${base}/eclipse/plugins/org.drools.eclipse.test_${jbossRulesVersion}" />
-    <unzip src="${base}/eclipse/plugins/org.drools.eclipse.test_${jbossRulesVersion}.jar"
-           dest="${base}/eclipse/plugins/org.drools.eclipse.test_${jbossRulesVersion}" />           
-    <delete file="${base}/eclipse/plugins/org.drools.eclipse.test_${jbossRulesVersion}.jar" />
--->    
+
+
     <ant antfile="${base}/eclipse/plugins/org.drools.eclipse.test_${jbossRulesVersion}/test.xml">        
       <property name="os" value="${baseos}" />
       <property name="ws" value="${basews}" />

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/.classpath
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/.classpath	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/.classpath	2007-04-10 00:01:53 UTC (rev 10838)
@@ -1,21 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src/main/java"/>
-	<classpathentry kind="src" path="src/main/resources"/>
-	<classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/antlr-3.0b5.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/drools-decisiontables-3.1.0-M1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/drools-jsr94-3.1.0-M1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/jsr94-1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/jxl-2.4.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/mvel14-1.2beta15.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/stringtemplate-3.0.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.3.4.O.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/xstream-1.1.3.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/drools-compiler-3.1.0-M1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/drools-core-3.1.0-M1.jar"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.4.0.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/antlr-3.0b5.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/drools-decisiontables-3.1.0-M1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/drools-jsr94-3.1.0-M1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jsr94-1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/jxl-2.4.2.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/mvel14-1.2beta15.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/stringtemplate-3.0.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.3.4.O.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/xstream-1.1.3.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/drools-compiler-3.1.0-M1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/drools-core-3.1.0-M1.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/META-INF/MANIFEST.MF
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/META-INF/MANIFEST.MF	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/META-INF/MANIFEST.MF	2007-04-10 00:01:53 UTC (rev 10838)
@@ -40,5 +40,7 @@
  lib/xpp3-1.1.3.4.O.jar,
  lib/xstream-1.1.3.jar,
  lib/drools-compiler-3.1.0-M1.jar,
- lib/drools-core-3.1.0-M1.jar
+ lib/drools-core-3.1.0-M1.jar,
+ drools-eclipse-plugin.jar,
+ lib/xercesImpl-2.4.0.jar
 Bundle-RequiredExecutionEnvironment: J2SE-1.4

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/build.properties
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/build.properties	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/build.properties	2007-04-10 00:01:53 UTC (rev 10838)
@@ -3,6 +3,8 @@
                plugin.xml,\
                help/,\
                lib/,\
+               drools-eclipse-plugin.jar,\
+               lib/xercesImpl-2.4.0.jar,\
                .
 src.includes = .project,\
                .classpath,\

Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/test.xml
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/test.xml	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/test.xml	2007-04-10 00:01:53 UTC (rev 10838)
@@ -1,11 +1,6 @@
 <?xml version="1.0"?>
-<project name="testsuite" default="run" basedir=".">
-  <!-- The property ${eclipse-home} should be passed into this script,
-       set a meaningful default value for when it is not. -->
-  <property name="baseLocation" location="${eclipse.home}"/>
-  <property name="eclipse-home" location="${baseLocation}"/>
-  
-  <!-- sets the properties eclipse-home, and library-file -->
+<project name="testsuite" default="run" basedir="."> 
+  <property name="eclipse-home" value="${baseLocation}"/>
   <property name="plugin-name" value="org.drools.eclipse"/>
   <property name="library-file" location="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
   
@@ -29,8 +24,7 @@
       <property name="data-dir" value="${test-workspace}"/>
       <property name="plugin-name" value="${plugin-name}"/>
       <property name="classname" value="org.drools.eclipse.AllTests"/>
-    </ant>       
-    
+    </ant>           
   </target>
   
   <!-- This target holds code to cleanup the testing environment after
@@ -43,9 +37,8 @@
   <!-- This target runs the test suite. Any actions that need to happen
        after all the tests have been run should go here. -->
   <target name="run" depends="init,suite,cleanup">
-    <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
-      <property name="includes" value="com*.xml"/>
-      <property name="output-file" value="${plugin-name}.xml"/>
-    </ant>
+    <copy todir="${base}/surefire-reports">
+      <fileset dir="${eclipse-home}" includes="org*.xml"/>
+    </copy>    
   </target>
 </project>
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-eclipse/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/pom.xml	2007-04-09 17:20:23 UTC (rev 10837)
+++ labs/jbossrules/trunk/drools-eclipse/pom.xml	2007-04-10 00:01:53 UTC (rev 10838)
@@ -20,7 +20,7 @@
         <executions>
           <execution>
             <id>copy-dependencies</id>
-            <phase>package</phase>
+            <phase>process-resources</phase>
             <goals>
               <goal>copy-dependencies</goal>
             </goals>
@@ -38,28 +38,123 @@
        <inherited>false</inherited>
        <executions>
          <execution>
-           <id>build-plugin</id>
-           <phase>package</phase>
+           <id>compile-plugin</id>
+           <phase>compile</phase>
            <configuration>
-             <tasks>
-                 <fail message="To build the plugin you are required to set the 'eclipse.home' property."
-                       if="${eclipse.home}" />
-                 <dirname property="eclipse.home.parent" file="${eclipse.home}"/>
-                 <echo message="eclipse.home        = ${eclipse.home}"/>
-                 <echo message="eclipse.home.parent = ${eclipse.home.parent}"/>
-                 <java jar="${eclipse.home}/startup.jar"
-                       fork="true"
-                       failonerror="true"
-                       maxmemory="128m"
-                 >
-                     <arg line="-application org.eclipse.ant.core.antRunner -Dbase=${eclipse.home.parent}"/>
-                 </java>                 
+             <tasks>                              
+                <property name="eclipse.home" value="target/eclipse" />             
+                <property name="localEclipseDrop" value="${basedir}/local-eclipse-drop-mirror" />      
+              
+                <property name="eclipse.home" value="target/eclipse" />             
+                <property name="localEclipseDrop" value="${basedir}/local-eclipse-drop-mirror" />
+                
+                <echo>Dbaseos=${baseos} -Dbasews=${basews} -Dbasearch=${basearch}</echo>                
+                
+                <delete  dir="target/eclipse.build" />
+                
+                <ant target="setupLocalEclipse" antfile="setupEclipse.xml" />
+                 
+                <java jar="${eclipse.home}/startup.jar"
+                      fork="true"
+                      failonerror="true"
+                      maxmemory="128m">
+                     <arg line="-application org.eclipse.ant.core.antRunner -DlocalEclipseDrop=${localEclipseDrop} -DmavenCompilePhase=true"/>
+                </java>                 
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
+         
+         <execution>
+           <id>test-plugin</id>
+           <phase>test</phase>
+           <configuration>
+             <tasks>            
+               <!-- Determine OS -->
+               <condition property="baseos" value="win32">
+                   <contains string="${os.name}" substring="Windows" />
+               </condition>
+             
+               <condition property="baseos" value="linux">
+                   <contains string="${os.name}" substring="Linux" />
+               </condition>
+               
+               <condition property="baseos" value="macosx">
+                   <contains string="${os.name}" substring="Mac OS X" />
+               </condition>
+               
+               <condition property="baseos" value="win32">
+                   <contains string="${os.name}" substring="Windows" />
+               </condition>        
+             
+               <condition property="baseos" value="aix">
+                   <contains string="${os.name}" substring="AIX" />
+               </condition>    
+               
+               <condition property="baseos" value="hpux">
+                   <contains string="${os.name}" substring="HP-UX" />
+               </condition> 
+               
+               <condition property="baseos" value="solaris">
+                   <contains string="${os.name}" substring="Solaris" />
+               </condition>  
+               
+               <condition property="baseos" value="qnx">
+                   <contains string="${os.name}" substring="QNX" />
+               </condition>                        
+               
+               <!-- Determine WS -->
+               <condition property="basews" value="win32">
+                   <contains string="${os.name}" substring="Windows" />
+               </condition>    
+               
+               <condition property="basews" value="gtk">
+                   <contains string="${os.name}" substring="Linux" />
+               </condition>    
+               
+               <condition property="basews" value="carbon">
+                   <contains string="${os.name}" substring="Mac OS X" />
+               </condition>        
+                   
+               <!-- Determine ARCH -->
+               <condition property="basearch" value="x86">
+                 <or>
+                   <contains string="${os.arch}" substring="i386" />
+                   <contains string="${os.arch}" substring="i686" />
+                   <contains string="${os.arch}" substring="x86" />
+                   <contains string="${os.arch}" substring="Pentium" />
+                 </or>
+               </condition>
+             
+               <condition property="basearch" value="linux">
+                   <contains string="${os.name}" substring="Linux" />
+               </condition>
+               
+               <condition property="basearch" value="ppc">
+                   <contains string="${os.name}" substring="ppc" />
+               </condition>
+               
+               <condition property="basearch" value="sparc">
+                   <contains string="${os.name}" substring="sparc" />
+               </condition>        
+              
+                <property name="eclipse.home" value="target/eclipse" />             
+                <property name="localEclipseDrop" value="${basedir}/local-eclipse-drop-mirror" />                
+                 
+                <java jar="${eclipse.home}/startup.jar"
+                      fork="true"
+                      failonerror="true"
+                      maxmemory="128m">
+                     <arg line="-application org.eclipse.ant.core.antRunner -Dbaseos=${baseos} -Dbasews=${basews} -Dbasearch=${basearch} -DlocalEclipseDrop=${localEclipseDrop} -DrunTests=true -DmavenTestPhase=true"/>
+                </java>                 
+             </tasks>
+           </configuration>
+           <goals>
+             <goal>run</goal>
+           </goals>
+         </execution>         
        </executions>
      </plugin>
     </plugins>
@@ -68,7 +163,7 @@
   <repositories>
     <repository>
       <id>basedir</id>
-      <url>file://${basedir}/../repository</url>
+      <url>file://${basedir}/../m2_repo</url>
     </repository>
   </repositories>
 

Added: labs/jbossrules/trunk/drools-eclipse/setupEclipse.xml
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/setupEclipse.xml	                        (rev 0)
+++ labs/jbossrules/trunk/drools-eclipse/setupEclipse.xml	2007-04-10 00:01:53 UTC (rev 10838)
@@ -0,0 +1,95 @@
+<project name="Setup Local  Eclipse" default="setupLocalEclipse">   
+  
+  <property file="build.properties"/>
+
+  <property name="localEclipseDrop" value="${basedir}/local-eclipse-drop-mirror" />  
+ 
+  <!-- set the OS name, make sure each condition is mutally exclusive -->
+	<condition property="download.extension" value="win32.zip">
+		<os family="windows" />
+	</condition>
+			
+	<condition property="download.extension" value="macosx-carbon.tar.gz">
+		<and>
+			<os family="mac" />
+			<os family="unix" />
+		</and>
+	</condition>
+	
+	<condition property="download.extension" value="linux-gtk.tar.gz">
+		<and>
+			<not>
+				<os family="mac" />
+			</not>
+			<os family="unix" />
+		</and>
+	</condition>		  		  
+   
+  <!-- make sure the directory exists -->   
+  <target name="makeLocalEclipseDropDir">
+    <mkdir dir="${localEclipseDrop}" />    
+  </target>   
+   
+  <target name="getEclipseJar" depends="checkEclipseJar" unless="skipGetEclipseJar">
+    <mkdir dir="${localEclipseDrop}/eclipse/${eclipseBuildRevision}" />    
+    
+    <get usetimestamp="true" src="${eclipseURL}/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.extension}" 
+         dest="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.extension}" /> 
+  </target>  
+  
+  <target name="getTestJar" depends="checkTestJar" unless="skipGetTestJar">
+    <mkdir dir="${localEclipseDrop}/eclipse/${eclipseBuildRevision}" />    
+    <get usetimestamp="true" src="${eclipseURL}/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip"
+         dest="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip"/>    
+  </target>
+
+  <target name="getGefJar" depends="checkGefJar" unless="skipGetGefJar">
+    <mkdir dir="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}" />    
+    <get usetimestamp="true" src="${eclipseGefURL}/${eclipseGefBuildRevision}/GEF-runtime-${eclipseBuildId}.zip" 
+         dest="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}/GEF-runtime-${eclipseBuildId}.zip" />
+  </target>      
+
+	<target name="checkEclipseJar">	
+		<available file="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-win32.zip" property="skipGetEclipseJar" />
+	</target>
+	
+	<target name="checkTestJar">	
+		<available file="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip" property="skipGetTestJar" />
+	</target>	
+		
+	<target name="checkGefJar">	
+		<available file="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}/GEF-runtime-${eclipseBuildId}.zip" property="skipGetGefJar" />
+	</target>	  
+
+  <target name="setupLocalEclipseDrop"  depends="checkEclipseDir" unless="skipUnzipEclipseJars">
+    <antcall target="makeLocalEclipseDropDir" />
+    <antcall target="getEclipseJar" />
+    <antcall target="getTestJar" />    
+    <antcall target="getGefJar" />      
+  </target>
+  
+  <target name="unzipEclipseJars">    
+  	<unzip dest="${base}" overwrite="true" 
+  	       src="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-SDK-${eclipseBuildId}-${download.extension}" />
+				
+    <unzip dest="${base}" overwrite="true"
+           src="${localEclipseDrop}/eclipse/${eclipseBuildRevision}/eclipse-test-framework-${eclipseBuildId}.zip" />   				
+				
+		<unzip dest="${base}" overwrite="true" 
+		       src="${localEclipseDrop}/tools/gef/${eclipseGefBuildRevision}/GEF-runtime-${eclipseBuildId}.zip" />				         
+  </target>    
+  
+  <target name="checkEclipseDir">
+    <available file="${base}/eclipse" property="skipUnzipEclipseJars" />
+  </target>
+    
+  <target name="setupLocalEclipse" depends="checkLocalEclipse" unless="skipSetupLocalEcipse">  
+    <antcall target="setupLocalEclipseDrop" />
+    <antcall target="unzipEclipseJars" />
+  </target>	
+  
+  <target name="checkLocalEclipse">
+      <available type="dir" file="${localEclipseDrop}/eclipse" property="skipSetupLocalEcipse" />
+  </target>
+  
+</project>
\ No newline at end of file




More information about the jboss-svn-commits mailing list