geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tki...@apache.org
Subject svn commit: r1023120 - in /geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher: build.xml pom.xml
Date Fri, 15 Oct 2010 21:38:08 GMT
Author: tkirby
Date: Fri Oct 15 21:38:07 2010
New Revision: 1023120

URL: http://svn.apache.org/viewvc?rev=1023120&view=rev
Log:
GERONIMODEVTOOLS-599 GERONIMODEVTOOLS-675 GERONIMODEVTOOLS-649 fix testsuite launching on
mac and simplify and refactor to eliminate duplicate code.
Using ant with conditions and os family property not working well on mac.  both isMac and
isUnix get set,
and property settings in the family task don't stick.  the properties are not set when needed.
revert to family setting in pom.xml, and use macrodef for common code.

Modified:
    geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/build.xml
    geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/pom.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/build.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/build.xml?rev=1023120&r1=1023119&r2=1023120&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/build.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/build.xml Fri Oct 15 21:38:07
2010
@@ -24,19 +24,7 @@
  | @version $Rev$ $Date$
  |
  -->
-<project name="GEP Automated Testsuite Launcher" default="launch" >
-
-    <condition property="isMac" >
-        <os family="mac" />
-    </condition>
-
-    <condition property="isUnix" >
-        <os family="unix" />
-    </condition>
-
-    <condition property="isWindows" >
-        <os family="windows" />
-    </condition>
+<project name="GEP Automated Testsuite Launcher" >
 
     <!--
      |
@@ -47,9 +35,8 @@
     <target name="init">
         <!-- Prompt to install aries tools manually -->
         <input>
-&#10;
 Please install Aries tools manually for eclipse under testsuite/launcher/eclipse,
-&#10;
+
 Free Aries tools download URL is http://www.ibm.com/developerworks/rational/downloads/10/rationaldevtoolsforosgiapplications.html
 
 Press Enter to continue...
@@ -66,52 +53,43 @@ Press Enter to continue...
         </copy>
     </target>
 
-    <target name="setOSproperties" >
-        <antcall target="mac" />
-        <antcall target="unix" />
-        <antcall target="windows" />
-    </target>
-
-    <target name="mac" if="isMac" >
-        <property name="osName" value="mac" />
-        <property name="os_property" value="macosx" />
-        <property name="ws_property" value="cocoa" />
-    </target>
-    <target name="unix" if="isUnix" >
-        <property name="osName" value="unix" />
-        <property name="os_property" value="linux" />
-        <property name="ws_property" value="gtk" />
-    </target>
-
-    <target name="windows" if="isWindows" >
-        <property name="osName" value="windows" />
-        <property name="os_property" value="win32" />
-        <property name="ws_property" value="win32" />
-    </target>
-
     <!--
      |
      | Start Eclipse via the Equinox launcher
      |
      -->
-    <target name="launch" depends="init, setOSproperties" description="Start Equinox launcher">
-        <echo>
-Launching Equinox on ${osName} with -Dos=${os_property} -Dws=${ws_property}
-        </echo>
-        <java classname="org.eclipse.equinox.launcher.Main"
-              failonerror="true"
-              fork="true">
-            <classpath>
-                <pathelement path="${eclipse-home}/eclipse/plugins/org.eclipse.equinox.launcher.jar"/>
-            </classpath>
-            <arg line="-data workspace" />
-            <arg line="-application org.eclipse.ant.core.antRunner"/>
-            <arg line="-file testsuite.xml"/>
-            <arg value="all"/>
-            <arg value="-Dos=${os_property}"/>
-            <arg value="-Dws=${ws_property}"/>
-            <arg value="-Darch=x86"/>
-        </java>
+    <macrodef name="launch" description="Start Equinox launcher" >
+        <attribute name="os" />
+        <attribute name="ws" />
+        <sequential>
+            <echo message="Launching Equinox with -Dos=@{os} -Dws=@{ws}" />
+            <java classname="org.eclipse.equinox.launcher.Main"
+                  failonerror="true"
+                  fork="true">
+                <classpath>
+                    <pathelement path="${eclipse-home}/eclipse/plugins/org.eclipse.equinox.launcher.jar"/>
+                </classpath>
+                <arg line="-data workspace" />
+                <arg line="-application org.eclipse.ant.core.antRunner"/>
+                <arg line="-file testsuite.xml"/>
+                <arg value="all"/>
+                <arg value="-Dos=@{os}"/>
+                <arg value="-Dws=@{ws}"/>
+                <arg value="-Darch=x86"/>
+            </java>
+        </sequential>
+    </macrodef>
+
+    <target name="mac" depends="init" description="Start Equinox launcher on mac" >
+        <launch os="macosx" ws="cocoa" />
+    </target>
+
+    <target name="unix" depends="init" description="Start Equinox launcher on unix" >
+        <launch os="linux" ws="gtk" />
+    </target>
+
+    <target name="windows" depends="init" description="Start Equinox launcher on windows"
>
+        <launch os="win32" ws="win32" />
     </target>
 
 </project>

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/pom.xml?rev=1023120&r1=1023119&r2=1023120&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/launcher/pom.xml Fri Oct 15 21:38:07
2010
@@ -46,6 +46,7 @@
                         <configuration>
                             <tasks>
                                 <ant antfile="${basedir}/build.xml">
+                                    <target name="${eclipsePlatformFamily}"></target>
                                 </ant>
                             </tasks>
                         </configuration>
@@ -73,5 +74,41 @@
             <type>pom</type>
         </dependency>
     </dependencies>
+
+    <profiles>
+        <profile>
+            <id>windows</id>
+            <activation>
+                <os>
+                    <family>windows</family>
+                </os>
+            </activation>
+            <properties>
+                <eclipsePlatformFamily>windows</eclipsePlatformFamily>
+            </properties>
+        </profile>
+        <profile>
+            <id>unix</id>
+            <activation>
+                <os>
+                    <family>unix</family>
+                </os>
+            </activation>
+            <properties>
+                <eclipsePlatformFamily>unix</eclipsePlatformFamily>
+            </properties>
+        </profile>
+        <profile>
+            <id>mac</id>
+            <activation>
+                <os>
+                    <family>mac</family>
+                </os>
+            </activation>
+            <properties>
+                <eclipsePlatformFamily>mac</eclipsePlatformFamily>
+            </properties>
+        </profile>
+    </profiles>
                                                 
 </project>



Mime
View raw message