You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by tk...@apache.org on 2010/10/08 18:40:20 UTC
svn commit: r1005892 - in /geronimo/devtools/eclipse-plugin/trunk/eclipse:
build.xml pom.xml
Author: tkirby
Date: Fri Oct 8 16:40:20 2010
New Revision: 1005892
URL: http://svn.apache.org/viewvc?rev=1005892&view=rev
Log:
GERONIMODEVTOOLS-599 simplifications of the build.xml
reworked build.xml using conditional property settings.
Simplify pom.xml by having ant <os family> determine environment, don't need maven to.
Modified:
geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml
geronimo/devtools/eclipse-plugin/trunk/eclipse/pom.xml
Modified: geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml?rev=1005892&r1=1005891&r2=1005892&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/eclipse/build.xml Fri Oct 8 16:40:20 2010
@@ -20,122 +20,155 @@
|
| Download eclipse artifacts and unzip them into the user's local maven repo
|
- |
| @version $Rev$ $Date$
-->
-<project name="EclipseArtifacts">
+<project name="EclipseArtifacts" default="doit" >
+
+ <!-- Set common propeties -->
+
+ <property name="eclipse_name" value="helios" />
+ <property name="eclipse_release" value="SR1" />
+ <property name="eclipse_basefilename" value="eclipse-jee-${eclipse_name}-${eclipse_release}" />
+ <property name="eclipse_downloadserver" value="http://www.eclipse.org/downloads/download.php?file=" />
+ <property name="eclipse_url" value="${eclipse_downloadserver}/technology/epp/downloads/release/${eclipse_name}/${eclipse_release}" />
- <condition property="is64bitJDK">
- <!--We only check JVM bit model here.It works fine even 32-bit JVM is used on 64-bit OS -->
+ <property name="protocol" value="&r=1&protocol=http" />
+
+ <!-- Set propeties based on environment: 32 or 64 bit JDK, OS (Mac, Unix or Windows) -->
+
+ <condition property="is64bitJDK" >
+ <!--We only check JVM bit model here. It works fine even 32-bit JVM is used on 64-bit OS -->
<equals arg1="${sun.arch.data.model}" arg2="64" />
</condition>
- <target name="init">
- <property name="eclipse_name" value="helios"/>
- <property name="eclipse_release" value="SR1"/>
- <property name="eclipse_basefilename" value="eclipse-jee-${eclipse_name}-${eclipse_release}"/>
- <property name="eclipse_downloadserver" value="http://www.eclipse.org/downloads/download.php?file="/>
- <property name="eclipse_url" value="${eclipse_downloadserver}/technology/epp/downloads/release/${eclipse_name}/${eclipse_release}"/>
+ <condition property="is32bitJDK" >
+ <not>
+ <isset property="is64bitJDK" />
+ </not>
+ </condition>
+
+ <condition property="isMac" >
+ <os family="mac" />
+ </condition>
- <property name="protocol" value="&r=1&protocol=http"/>
- </target>
+ <condition property="isUnix" >
+ <os family="unix" />
+ </condition>
+
+ <condition property="isWindows" >
+ <os family="windows" />
+ </condition>
+
+ <!-- unzip or gunzip and untar? Set properties appropriately -->
+
+ <condition property="isZip" >
+ <isset property="isWindows" />
+ </condition>
+
+ <condition property="isTarGz" >
+ <or>
+ <isset property="isMac" />
+ <isset property="isUnix" />
+ </or>
+ </condition>
+
+ <!-- We will download ${eclipse_zip}, and untar ${eclipse_tar}.
+ Set ${eclipse_zip} name based on our environment (OS, 32/64 bit)
+ -->
+
+ <condition property="eclipse_zip" value="${eclipse_basefilename}-win32.zip" >
+ <and>
+ <isset property="isWindows" />
+ <isset property="is32bitJDK" />
+ </and>
+ </condition>
+
+ <condition property="eclipse_zip" value="${eclipse_basefilename}-win32_64.zip" >
+ <and>
+ <isset property="isWindows" />
+ <isset property="is64bitJDK" />
+ </and>
+ </condition>
+
+ <!-- ${eclipse_tar} not needed on windows, just mac and unix.
+ Set ${eclipse_zip} for them below by adding .gz
+ -->
+
+ <condition property="eclipse_tar" value="${eclipse_basefilename}-macosx-cocoa.tar" >
+ <and>
+ <isset property="isMac" />
+ <isset property="is32bitJDK" />
+ </and>
+ </condition>
+
+ <condition property="eclipse_tar" value="${eclipse_basefilename}-macosx-cocoa-x86_64.tar" >
+ <and>
+ <isset property="isMac" />
+ <isset property="is64bitJDK" />
+ </and>
+ </condition>
+
+ <condition property="eclipse_tar" value="${eclipse_basefilename}-linux-gtk.tar" >
+ <and>
+ <isset property="isUnix" />
+ <isset property="is32bitJDK" />
+ </and>
+ </condition>
+
+ <condition property="eclipse_tar" value="${eclipse_basefilename}-linux-gtk-x86_64.tar" >
+ <and>
+ <isset property="isUnix" />
+ <isset property="is64bitJDK" />
+ </and>
+ </condition>
+
+ <!-- Set ${eclipse_zip} if needed in TarGz environment. -->
+ <condition property="eclipse_zip" value="${eclipse_tar}.gz" >
+ <isset property="isTarGz" />
+ </condition>
- <target name="win" depends="init" description="Download Windows-specific artifact(s)">
- <antcall target="win64"></antcall>
- <antcall target="win32"></antcall>
+ <target name="doit">
+ <antcall target="download" />
+ <antcall target="unzip" />
+ <antcall target="untargz" />
</target>
- <target name="common_download" description="Download artifact(s)">
+ <target name="download" description="Download artifact(s)" >
+
<echo>#################################################################################</echo>
<echo>## </echo>
<echo>## Downloading: ${eclipse_zip} </echo>
<echo>## </echo>
- <echo>## From: ${eclipse_url} </echo>
+ <echo>## From: ${eclipse_url} </echo>
<echo>## </echo>
<echo>#################################################################################</echo>
- <mkdir dir="${LOCAL_M2_REPO}/eclipse-downloads"/>
+ <mkdir dir="${LOCAL_M2_REPO}/eclipse-downloads" />
<get src="${eclipse_url}/${eclipse_zip}${protocol}"
dest="${LOCAL_M2_REPO}/eclipse-downloads/${eclipse_zip}"
verbose="true"
ignoreerrors="true"
- usetimestamp="true"/>
+ usetimestamp="true" />
<echo>#################################################################################</echo>
<echo>## </echo>
<echo>## Unzipping: ${eclipse_zip} </echo>
<echo>## </echo>
<echo>#################################################################################</echo>
- <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true"/>
- <mkdir dir="${LOCAL_M2_REPO}/eclipse"/>
+ <delete dir="${LOCAL_M2_REPO}/eclipse" quiet="true" />
+ <mkdir dir="${LOCAL_M2_REPO}/eclipse" />
</target>
- <target name="common_zip" description="Download and Unzip artifact(s)">
- <antcall target="common_download">
- <param name="eclipse_zip" value="${eclipse_zip}"/>
- </antcall>
+ <target name="unzip" if="isZip" description="Unzip artifact(s)" >
<unzip src="${LOCAL_M2_REPO}/eclipse-downloads/${eclipse_zip}"
dest="${LOCAL_M2_REPO}/eclipse"
- overwrite="true"/>
+ overwrite="true" />
</target>
- <target name="common_targz" description="Download and Unzip artifact(s)">
- <antcall target="common_download">
- <param name="eclipse_zip" value="${eclipse_zip}"/>
- </antcall>
- <gunzip src="${LOCAL_M2_REPO}/eclipse-downloads/${eclipse_zip}"/>
+ <target name="untargz" if="isTarGz" description="Ungzip and Untar artifact(s)" >
+ <gunzip src="${LOCAL_M2_REPO}/eclipse-downloads/${eclipse_zip}" />
<untar src="${LOCAL_M2_REPO}/eclipse-downloads/${eclipse_tar}"
dest="${LOCAL_M2_REPO}/eclipse"
- overwrite="true"/>
- </target>
-
- <target name="win32" unless="is64bitJDK" description="Download Windows 32-bit-specific artifact(s)">
- <antcall target="common_zip">
- <param name="eclipse_zip" value="${eclipse_basefilename}-win32.zip"/>
- </antcall>
- </target>
-
- <target name="win64" if="is64bitJDK" description="Download Windows 64-bit-specific artifact(s)">
- <antcall target="common_zip">
- <param name="eclipse_zip" value="${eclipse_basefilename}-win32_64.zip"/>
- </antcall>
- </target>
-
- <target name="linux" depends="init" description="Download Linux-specific artifact(s)">
- <antcall target="linux_x86"></antcall>
- <antcall target="linux-x86_64"></antcall>
- </target>
-
- <target name="linux_x86" unless="is64bitJDK" description="Download Linux 32-bit-specific artifact(s)">
- <antcall target="common_targz">
- <param name="eclipse_tar" value="${eclipse_basefilename}-linux-gtk.tar"/>
- <param name="eclipse_zip" value="${eclipse_basefilename}-linux-gtk.tar.gz"/>
- </antcall>
- </target>
-
- <target name="linux-x86_64" if="is64bitJDK" description="Download Linux 64-bit-specific artifact(s)">
- <antcall target="common_targz">
- <param name="eclipse_tar" value="${eclipse_basefilename}-linux-gtk-x86_64.tar"/>
- <param name="eclipse_zip" value="${eclipse_basefilename}-linux-gtk-x86_64.tar.gz"/>
- </antcall>
- </target>
-
- <target name="macos" depends="init" description="Download MacOS-specific artifact(s)">
- <antcall target="mac32"></antcall>
- <antcall target="mac64"></antcall>
- </target>
-
- <target name="mac32" unless="is64bitJDK" description="Download MacOS 32-bit-specific artifact(s)">
- <antcall target="common_targz">
- <param name="eclipse_tar" value="${eclipse_basefilename}-macosx-cocoa.tar"/>
- <param name="eclipse_zip" value="${eclipse_basefilename}-macosx-cocoa.tar.gz"/>
- </antcall>
- </target>
-
- <target name="mac64" if="is64bitJDK" description="Download MacOS 64-bit-specific artifact(s)">
- <antcall target="common_targz">
- <param name="eclipse_tar" value="${eclipse_basefilename}-macosx-cocoa-x86_64.tar"/>
- <param name="eclipse_zip" value="${eclipse_basefilename}-macosx-cocoa-x86_64.tar.gz"/>
- </antcall>
+ overwrite="true" />
</target>
</project>
Modified: geronimo/devtools/eclipse-plugin/trunk/eclipse/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/eclipse/pom.xml?rev=1005892&r1=1005891&r2=1005892&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/eclipse/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/eclipse/pom.xml Fri Oct 8 16:40:20 2010
@@ -15,23 +15,23 @@
~ limitations under the License.
-->
<!-- $Rev: 529767 $ $Date: 2007-04-17 17:21:24 -0400 (Tue, 17 Apr 2007) $ -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
+
<modelVersion>4.0.0</modelVersion>
-
+
<groupId>org.apache.geronimo.devtools</groupId>
<artifactId>eclipse</artifactId>
<version>3.0.0</version>
<packaging>pom</packaging>
<name>Geronimo Eclipse Plugin :: Eclipse</name>
-
+
<parent>
<groupId>org.apache.geronimo.devtools</groupId>
<artifactId>geronimo-eclipse-plugin</artifactId>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
-
+
<build>
<plugins>
<plugin>
@@ -44,9 +44,7 @@
<configuration>
<tasks>
<property name="LOCAL_M2_REPO" value="${settings.localRepository}" />
- <ant antfile="${basedir}/build.xml">
- <target name="${eclipsePlatformFamily}" />
- </ant>
+ <ant antfile="${basedir}/build.xml" />
</tasks>
</configuration>
<goals>
@@ -61,7 +59,7 @@
<plugins>
<!-- skip deploy child artifacts in release process-->
<plugin>
- <artifactId>maven-deploy-plugin</artifactId>
+ <artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
@@ -69,41 +67,5 @@
</plugins>
</pluginManagement>
</build>
-
- <profiles>
- <profile>
- <id>windows</id>
- <activation>
- <os>
- <family>windows</family>
- </os>
- </activation>
- <properties>
- <eclipsePlatformFamily>win</eclipsePlatformFamily>
- </properties>
- </profile>
- <profile>
- <id>unix-x86</id>
- <activation>
- <os>
- <family>unix</family>
- </os>
- </activation>
- <properties>
- <eclipsePlatformFamily>linux</eclipsePlatformFamily>
- </properties>
- </profile>
- <profile>
- <id>mac</id>
- <activation>
- <os>
- <family>mac</family>
- </os>
- </activation>
- <properties>
- <eclipsePlatformFamily>macos</eclipsePlatformFamily>
- </properties>
- </profile>
- </profiles>
-
+
</project>