Author: kkolinko Date: Fri Jan 7 23:54:54 2011 New Revision: 1056562 URL: http://svn.apache.org/viewvc?rev=1056562&view=rev Log: Provide two alternative locations for the libraries downloaded from the ASF web site at build time. Use the main distribution site as default and the archive one as fallback.
Modified: tomcat/trunk/build.properties.default tomcat/trunk/build.xml tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1056562&r1=1056561&r2=1056562&view=diff ============================================================================== --- tomcat/trunk/build.properties.default (original) +++ tomcat/trunk/build.properties.default Fri Jan 7 23:54:54 2011 @@ -52,8 +52,13 @@ compile.source=1.6 compile.target=1.6 compile.debug=true -base-commons.loc=http://archive.apache.org/dist/commons -base-tomcat.loc=http://archive.apache.org/dist/tomcat +base-apache.loc.1=http://www.apache.org/dist +base-apache.loc.2=http://archive.apache.org/dist +base-commons.loc.1=${base-apache.loc.1}/commons +base-commons.loc.2=${base-apache.loc.2}/commons +base-tomcat.loc.1=${base-apache.loc.1}/tomcat +base-tomcat.loc.2=${base-apache.loc.2}/tomcat + base-sf.loc=http://downloads.sourceforge.net base-maven1.loc=http://repo1.maven.org/maven @@ -68,7 +73,8 @@ base-maven1.loc=http://repo1.maven.org/m # - servletapi commons-logging.version=1.1.1 commons-logging.home=${base.path}/commons-logging-${commons-logging.version} -commons-logging-src.loc=${base-commons.loc}/logging/source/commons-logging-${commons-logging.version}-src.tar.gz +commons-logging-src.loc.1=${base-commons.loc.1}/logging/source/commons-logging-${commons-logging.version}-src.tar.gz +commons-logging-src.loc.2=${base-commons.loc.2}/logging/source/commons-logging-${commons-logging.version}-src.tar.gz commons-logging-src.tar.gz=${commons-logging.home}/commons-logging-${commons-logging.version}-src.tar.gz # ----- Avalon Framework (required by commons logging) ----- @@ -120,8 +126,10 @@ jdt.loc.2=http://download.eclipse.org/ec tomcat-native.version=1.1.20 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version} tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz -tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz -tomcat-native.dll=${base-tomcat.loc}/tomcat-connectors/native/${tomcat-native.version}/binaries +tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz +tomcat-native.loc.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz +tomcat-native.dll.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/binaries +tomcat-native.dll.2=${base-tomcat.loc.2}/tomcat-connectors/native/${tomcat-native.version}/binaries tomcat-native.dll.win32=${tomcat-native.home}/tcnative-1.dll.x86 tomcat-native.dll.x64=${tomcat-native.home}/tcnative-1.dll.x64 tomcat-native.dll.i64=${tomcat-native.home}/tcnative-1.dll.i64 @@ -129,11 +137,13 @@ tomcat-native.dll.i64=${tomcat-native.ho # ----- Commons DBCP, version 1.1 or later ----- commons-dbcp.version=1.4 commons-dbcp.home=${base.path}/commons-dbcp-1.4-src -commons-dbcp-src.loc=${base-commons.loc}/dbcp/source/commons-dbcp-1.4-src.tar.gz +commons-dbcp-src.loc.1=${base-commons.loc.1}/dbcp/source/commons-dbcp-1.4-src.tar.gz +commons-dbcp-src.loc.2=${base-commons.loc.2}/dbcp/source/commons-dbcp-1.4-src.tar.gz # ----- Commons Pool, version 1.1 or later ----- commons-pool.home=${base.path}/commons-pool-1.5.5-src -commons-pool-src.loc=${base-commons.loc}/pool/source/commons-pool-1.5.5-src.tar.gz +commons-pool-src.loc.1=${base-commons.loc.1}/pool/source/commons-pool-1.5.5-src.tar.gz +commons-pool-src.loc.2=${base-commons.loc.2}/pool/source/commons-pool-1.5.5-src.tar.gz # ----- NSIS, version 2.0 or later ----- nsis.home=${base.path}/nsis-2.46 @@ -151,9 +161,12 @@ commons-daemon.native.win.home=${commons commons-daemon.native.win.mgr.exe=${commons-daemon.native.win.home}/prunmgr.exe commons-daemon.native.src.tgz=${commons-daemon.home}/commons-daemon-${commons-daemon.version}-native-src.tar.gz commons-daemon.native.win.zip=${commons-daemon.home}/commons-daemon-${commons-daemon.version}-bin-windows.zip -commons-daemon.bin.loc=${base-commons.loc}/daemon/binaries/${commons-daemon.version}/commons-daemon-${commons-daemon.version}-bin.tar.gz -commons-daemon.native.src.loc=${base-commons.loc}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz -commons-daemon.native.win.loc=${base-commons.loc}/daemon/binaries/${commons-daemon.version}/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip +commons-daemon.bin.loc.1=${base-commons.loc.1}/daemon/binaries/${commons-daemon.version}/commons-daemon-${commons-daemon.version}-bin.tar.gz +commons-daemon.bin.loc.2=${base-commons.loc.2}/daemon/binaries/${commons-daemon.version}/commons-daemon-${commons-daemon.version}-bin.tar.gz +commons-daemon.native.src.loc.1=${base-commons.loc.1}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz +commons-daemon.native.src.loc.2=${base-commons.loc.2}/daemon/source/commons-daemon-${commons-daemon.version}-native-src.tar.gz +commons-daemon.native.win.loc.1=${base-commons.loc.1}/daemon/binaries/${commons-daemon.version}/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip +commons-daemon.native.win.loc.2=${base-commons.loc.2}/daemon/binaries/${commons-daemon.version}/windows/commons-daemon-${commons-daemon.version}-bin-windows.zip # ----- JUnit Unit Test Suite, version 3.7 or later ----- junit.home=${base.path}/junit3.8.2 Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1056562&r1=1056561&r2=1056562&view=diff ============================================================================== --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Fri Jan 7 23:54:54 2011 @@ -1095,8 +1095,9 @@ depends="extras-prepare" description="Prepare to build web services extras package"> - <antcall target="downloadfile"> - <param name="sourcefile" value="${commons-logging-src.loc}"/> + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/> + <param name="sourcefile.2" value="${commons-logging-src.loc.2}"/> <param name="destfile" value="${commons-logging-src.tar.gz}"/> <param name="destdir" value="${commons-logging.home}"/> </antcall> @@ -2098,31 +2099,36 @@ Apache Tomcat ${version} native binaries <target name="download-compile" description="Download (and build) components necessary to compile" > - <antcall target="downloadfile"> - <param name="sourcefile" value="${tomcat-native.loc}"/> + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> + <param name="sourcefile.2" value="${tomcat-native.loc.2}"/> <param name="destfile" value="${tomcat-native.tar.gz}"/> <param name="destdir" value="${tomcat-native.home}"/> </antcall> <!-- Download Commons Daemon --> - <antcall target="downloadgz"> - <param name="sourcefile" value="${commons-daemon.bin.loc}"/> + <antcall target="downloadgz-2"> + <param name="sourcefile.1" value="${commons-daemon.bin.loc.1}"/> + <param name="sourcefile.2" value="${commons-daemon.bin.loc.2}"/> <param name="destfile" value="${commons-daemon.jar}"/> </antcall> - <antcall target="downloadfile"> - <param name="sourcefile" value="${commons-daemon.native.src.loc}"/> + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${commons-daemon.native.src.loc.1}"/> + <param name="sourcefile.2" value="${commons-daemon.native.src.loc.2}"/> <param name="destfile" value="${commons-daemon.native.src.tgz}"/> <param name="destdir" value="${commons-daemon.home}"/> </antcall> <!-- Download src and build Tomcat DBCP bundle --> - <antcall target="downloadgz"> - <param name="sourcefile" value="${commons-pool-src.loc}"/> + <antcall target="downloadgz-2"> + <param name="sourcefile.1" value="${commons-pool-src.loc.1}"/> + <param name="sourcefile.2" value="${commons-pool-src.loc.2}"/> <param name="destfile" value="${commons-pool.home}/build.xml" /> </antcall> - <antcall target="downloadgz"> - <param name="sourcefile" value="${commons-dbcp-src.loc}"/> + <antcall target="downloadgz-2"> + <param name="sourcefile.1" value="${commons-dbcp-src.loc.1}"/> + <param name="sourcefile.2" value="${commons-dbcp-src.loc.2}"/> <param name="destfile" value="${commons-dbcp.home}/build.xml" /> </antcall> <mkdir dir="${tomcat-dbcp.home}"/> @@ -2157,26 +2163,30 @@ Apache Tomcat ${version} native binaries <target name="download-dist" description="Download additional components for a distribution" > - <antcall target="downloadfile"> - <param name="sourcefile" value="${tomcat-native.dll}/win32/tcnative-1.dll"/> + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.dll.1}/win32/tcnative-1.dll"/> + <param name="sourcefile.2" value="${tomcat-native.dll.2}/win32/tcnative-1.dll"/> <param name="destfile" value="${tomcat-native.dll.win32}"/> <param name="destdir" value="${tomcat-native.home}"/> </antcall> - <antcall target="downloadfile"> - <param name="sourcefile" value="${tomcat-native.dll}/win64/x64/tcnative-1.dll"/> + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.dll.1}/win64/x64/tcnative-1.dll"/> + <param name="sourcefile.2" value="${tomcat-native.dll.2}/win64/x64/tcnative-1.dll"/> <param name="destfile" value="${tomcat-native.dll.x64}"/> <param name="destdir" value="${tomcat-native.home}"/> </antcall> - <antcall target="downloadfile"> - <param name="sourcefile" value="${tomcat-native.dll}/win64/ia64/tcnative-1.dll"/> + <antcall target="downloadfile-2"> + <param name="sourcefile.1" value="${tomcat-native.dll.1}/win64/ia64/tcnative-1.dll"/> + <param name="sourcefile.2" value="${tomcat-native.dll.2}/win64/ia64/tcnative-1.dll"/> <param name="destfile" value="${tomcat-native.dll.i64}"/> <param name="destdir" value="${tomcat-native.home}"/> </antcall> - <antcall target="downloadzip"> - <param name="sourcefile" value="${commons-daemon.native.win.loc}"/> + <antcall target="downloadzip-2"> + <param name="sourcefile.1" value="${commons-daemon.native.win.loc.1}"/> + <param name="sourcefile.2" value="${commons-daemon.native.win.loc.2}"/> <param name="destfile" value="${commons-daemon.native.win.mgr.exe}"/> <param name="destdir" value="${commons-daemon.native.win.home}"/> </antcall> @@ -2272,6 +2282,24 @@ Apache Tomcat ${version} native binaries <delete file="${base.path}/file.tar.gz"/> </target> + <target name="downloadgz-2" unless="exist" depends="setproxy,testexist"> + <!-- Download and extract the package from the two alternative locations --> + <delete file="${base.path}/file.tar" quiet="true" /> + <delete file="${base.path}/file.tar.gz" quiet="true" /> + <antcall target="trydownload"> + <param name="sourcefile" value="${sourcefile.1}" /> + <param name="destfile" value="${base.path}/file.tar.gz" /> + </antcall> + <antcall target="trydownload"> + <param name="sourcefile" value="${sourcefile.2}" /> + <param name="destfile" value="${base.path}/file.tar.gz" /> + </antcall> + <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/> + <untar src="${base.path}/file.tar" dest="${base.path}"/> + <delete file="${base.path}/file.tar"/> + <delete file="${base.path}/file.tar.gz"/> + </target> + <target name="downloadzip" unless="exist" depends="setproxy,testexist"> <!-- Download and extract the package --> <get src="${sourcefile}" dest="${base.path}/file.zip" /> @@ -2280,6 +2308,22 @@ Apache Tomcat ${version} native binaries <delete file="${base.path}/file.zip"/> </target> + <target name="downloadzip-2" unless="exist" depends="testexist"> + <!-- Download and extract the package from the two alternative locations --> + <delete file="${base.path}/file.zip" quiet="true" /> + <antcall target="trydownload"> + <param name="sourcefile" value="${sourcefile.1}" /> + <param name="destfile" value="${base.path}/file.zip" /> + </antcall> + <antcall target="trydownload"> + <param name="sourcefile" value="${sourcefile.2}" /> + <param name="destfile" value="${base.path}/file.zip" /> + </antcall> + <mkdir dir="${destdir}" /> + <unzip src="${base.path}/file.zip" dest="${destdir}"/> + <delete file="${base.path}/file.zip"/> + </target> + <target name="downloadfile" unless="exist" depends="setproxy,testexist"> <!-- Download extract the file --> <mkdir dir="${destdir}" /> Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1056562&r1=1056561&r2=1056562&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Fri Jan 7 23:54:54 2011 @@ -320,6 +320,11 @@ <bug>50552</bug>: Avoid NPE that hides error message when using Ant tasks. (schultz) </fix> + <add> + Provide two alternative locations for the libraries downloaded from + the ASF web site at build time. Use the main distribution site as + default and the archive one as fallback. (kkolinko) + </add> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org