Author: kkolinko
Date: Wed Feb 10 00:50:40 2010
New Revision: 908300

URL: http://svn.apache.org/viewvc?rev=908300&view=rev
Log:
- Update JDT compiler to version 3.5.1
- Use JDT Core Batch Compiler download instead of JDT SDK download. It lessens 
the download size from 40 MB down to 1.6 MB.
- Implement support for two alternative download locations of a file.

Modified:
    tomcat/trunk/build.properties.default
    tomcat/trunk/build.xml

Modified: tomcat/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=908300&r1=908299&r2=908300&view=diff
==============================================================================
--- tomcat/trunk/build.properties.default (original)
+++ tomcat/trunk/build.properties.default Wed Feb 10 00:50:40 2010
@@ -67,10 +67,13 @@
 wsdl4j-lib.jar=${wsdl4j-lib.home}/wsdl4j-${wsdl4j-lib.version}.jar
 
 # ----- Eclipse JDT, version 3.2 or later -----
-jdt.home=${base.path}/eclipse/plugins
-jdt.lib=${jdt.home}
-jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.4.4.v_894_R34x.jar
-jdt.loc=http://archive.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/eclipse-JDT-SDK-3.4.2.zip
+jdt.version=3.5.1
+jdt.release=R-3.5.1-200909170800
+jdt.home=${base.path}/ecj-${jdt.version}
+jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
+# The download will be moved to the archive area eventually. We are taking 
care of that in advance.
+jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops/${jdt.release}/ecj-${jdt.version}.jar
+jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops/${jdt.release}/ecj-${jdt.version}.jar
 
 # ----- Tomcat native library -----
 tomcat-native.version=1.1.19

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=908300&r1=908299&r2=908300&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Wed Feb 10 00:50:40 2010
@@ -295,8 +295,9 @@
 
   <patternset id="files.jasper-jdt">
     <include name="org/eclipse/jdt/core/compiler/**"/>
+    <include name="org/eclipse/jdt/core/JDTCompilerAdapter*"/>
+    <include name="org/eclipse/jdt/internal/antadapter/**"/>
     <include name="org/eclipse/jdt/internal/compiler/**"/>
-    <include name="org/eclipse/jdt/internal/core/util/CommentRecorder*"/>
   </patternset>
 
   <patternset id="files.tomcat-dbcp">
@@ -1657,10 +1658,11 @@
     </antcall>
 
     <!-- Download src and build Jasper JDT bundle -->
-    <antcall target="downloadzip">
-      <param name="sourcefile" value="${jdt.loc}"/>
+    <antcall target="downloadfile-2">
+      <param name="sourcefile.1" value="${jdt.loc.1}"/>
+      <param name="sourcefile.2" value="${jdt.loc.2}"/>
       <param name="destfile" value="${jdt.jar}"/>
-      <param name="destdir" value="${base.path}"/>
+      <param name="destdir" value="${jdt.home}"/>
     </antcall>
     <mkdir dir="${jasper-jdt.home}"/>
     <condition property="no.build.jasper-jdt">
@@ -1817,6 +1819,37 @@
     <get src="${sourcefile}" dest="${destfile}" />
   </target>
 
+  <target name="downloadfile-2" unless="exist" depends="testexist">
+    <!-- Download the file from the two alternative locations -->
+    <mkdir dir="${destdir}" />
+
+    <antcall target="trydownload">
+      <param name="sourcefile" value="${sourcefile.1}" />
+    </antcall>
+
+    <antcall target="trydownload">
+      <param name="sourcefile" value="${sourcefile.2}" />
+    </antcall>
+
+    <available file="${destfile}" property="exist"/>
+    <fail unless="exist" message="Failed to download [${destfile}]. All 
download sources are unavailable." />
+  </target>
+
+  <target name="trydownload.check" depends="setproxy">
+    <condition property="trydownload.run">
+      <and>
+        <not>
+          <available file="${destfile}" />
+        </not>
+        <http url="${sourcefile}" />
+      </and>
+    </condition>
+  </target>
+
+  <target name="trydownload" if="trydownload.run" depends="trydownload.check">
+    <!-- Downloads a file if not yet downloaded and the source URL is 
available -->
+    <get src="${sourcefile}" dest="${destfile}" />
+  </target>
 
   <!-- ======================= Macros, Taskdefs etc ======================== 
-->
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to