You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by he...@apache.org on 2005/10/28 17:00:44 UTC

svn commit: r329218 - in /jakarta/velocity/core/trunk/build: build.properties build.xml download.xml lib/ testcases.xml

Author: henning
Date: Fri Oct 28 08:00:37 2005
New Revision: 329218

URL: http://svn.apache.org/viewcvs?rev=329218&view=rev
Log:
Remove libraries from Subversion. The ant build now fetches all needed
libraries directly from the central repository at www.ibiblio.org.

You need this only if you actually fetched the source code from the
web and want to compile it for yourself. As for the download a web
connection is needed anyway, there is no point in fetching the jars
from the Apache Subversion repo.

This also reduces the size of the actual download from the Subversion
by ~3.5 MB.


Added:
    jakarta/velocity/core/trunk/build/download.xml   (with props)
Removed:
    jakarta/velocity/core/trunk/build/lib/
Modified:
    jakarta/velocity/core/trunk/build/build.properties
    jakarta/velocity/core/trunk/build/build.xml
    jakarta/velocity/core/trunk/build/testcases.xml

Modified: jakarta/velocity/core/trunk/build/build.properties
URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/build/build.properties?rev=329218&r1=329217&r2=329218&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/build/build.properties (original)
+++ jakarta/velocity/core/trunk/build/build.properties Fri Oct 28 08:00:37 2005
@@ -36,7 +36,6 @@
 javacc.home= *unset*
 
 velocity.build.dir= build
-velocity.lib.dir= ${velocity.build.dir}/lib
 
 build.dir= ${velocity.dir}/bin
 
@@ -44,6 +43,7 @@
 # allow substitution of version, date etc. and will
 # end up in build.src
 build.src=       ${build.dir}/src
+build.lib=       ${build.dir}/lib
 build.test.src=  ${build.dir}/test-src
 build.dest=      ${build.dir}/classes
 build.deps=      ${build.dir}/deps
@@ -76,13 +76,36 @@
 # when building docs for web site
 docs.project= project.xml
 
-# jars explicitly needed for bulding 'dep jar'
-log.jar= ${velocity.lib.dir}/logkit-1.0.1.jar
-oro.jar= ${velocity.lib.dir}/oro-2.0.8.jar
-collections.jar= ${velocity.lib.dir}/commons-collections-3.1.jar
-lang.jar= ${velocity.lib.dir}/commons-lang-2.1.jar
-
 # Set to Sun Javadocs
 javadocs.ref.jsdk= http://java.sun.com/j2se/1.4.2/docs/api/
 
-
+########################################################################
+#
+# Downloading jars from ibiblio repository
+#
+########################################################################
+
+#
+# Settings for the proxy to use for download. Change this if you must
+# use a proxy from your host. If the proxy.host property is unset, no
+# proxy is used.
+proxy.host= 
+proxy.port= 80
+
+#
+# We download directly from the ibiblio maven repository
+repo.url= http://www.ibiblio.org/maven
+
+#
+# Jars to be downloaded 
+jar.antlr.version= 2.7.5
+jar.avalon-logkit.version= 2.1
+jar.bcel.version= 5.1
+jar.commons-collections.version= 3.1
+jar.commons-lang.version= 2.1
+jar.jdom.version= 1.0
+jar.junit.version= 3.8.1
+jar.log4j.version= 1.2.12
+jar.oro.version= 2.0.8
+jar.servletapi.version= 2.3
+jar.werken-xpath.version= 0.9.4

Modified: jakarta/velocity/core/trunk/build/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/build/build.xml?rev=329218&r1=329217&r2=329218&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/build/build.xml (original)
+++ jakarta/velocity/core/trunk/build/build.xml Fri Oct 28 08:00:37 2005
@@ -39,18 +39,6 @@
   <property name="parserjj.file"  value="${build.parser}/Parser.jj" />
   <property name="parserjjt.file" value="${build.parser}/Parser.jjt" />
 
-  <!-- Build classpath -->
-  <path id="velocity.build.classpath">
-    <fileset dir="${velocity.lib.dir}">
-      <include name="**/*.jar"/>
-    </fileset>
-  </path>
-
-  <path id="velocity.run.classpath">
-    <path refid="velocity.build.classpath"/>
-    <pathelement location="${build.dir}/${final.name}.jar"/>
-  </path>
-
   <!-- =================================================================== -->
   <!-- prints the targets available in this build file                     -->
   <!-- =================================================================== -->
@@ -135,6 +123,25 @@
   </target>
 
   <!-- =================================================================== -->
+  <!-- sets up the build environment (classpath and libs)                  -->
+  <!-- =================================================================== -->
+  <target name="build-prepare">
+    <ant antfile="${velocity.build.dir}/download.xml" target="build-download" />
+
+    <!-- Build classpath -->
+    <path id="velocity.build.classpath">
+      <fileset dir="${build.lib}">
+        <include name="**/*.jar"/>
+      </fileset>
+    </path>
+  
+    <path id="velocity.run.classpath">
+      <path refid="velocity.build.classpath"/>
+      <pathelement location="${build.dir}/${final.name}.jar"/>
+    </path>
+  </target>
+
+  <!-- =================================================================== -->
   <!-- checks for the existence/non-existence of various java features     -->
   <!--                                                                     -->
   <!-- currently checks for                                                -->
@@ -145,7 +152,7 @@
   <target name="prepare-jdbc" depends="check-jdbc,check-jdbc-true,check-jdbc-false"/>
   <target name="prepare-jdk14" depends="check-jdk14,check-jdk14-true,check-jdk14-false"/>
 
-  <target name="check-jdbc">
+  <target name="check-jdbc" depends="build-prepare">
     <!--  note: check to see if required class is available.  -->
     <!-- might be j2ee.jar, jdbc2_0-stdext.jar, or simply JDK 1.4+ -->
     <available classname="javax.sql.DataSource"
@@ -176,7 +183,7 @@
     </echo>
   </target>
 
-  <target name="check-jdk14">
+  <target name="check-jdk14" depends="build-prepare">
      <available classname="java.util.logging.Logger"
                property="jdk14.present">
       <classpath refid="velocity.build.classpath"/>
@@ -209,7 +216,7 @@
   <!-- =================================================================== -->
   <target name="compile" depends="compile-src,compile-test"/>
 
-  <target name="compile-src" depends="prepare,check-jdbc,check-jdk14"
+  <target name="compile-src" depends="prepare,build-prepare,check-jdbc,check-jdk14"
           description="Compiles the Velocity source">
     <javac srcdir="${build.src}"
       destdir="${build.dest}"
@@ -227,7 +234,7 @@
 
   </target>
 
-  <target name="compile-test" depends="prepare,compile-src"
+  <target name="compile-test" depends="prepare,build-prepare,compile-src"
           description="Compiles the Velocity test classes">
     <javac srcdir="${build.test.src}"
       destdir="${build.test.dest}"
@@ -343,7 +350,7 @@
   <!-- ================================================================ -->
   <target name="build-dependency-classes">
     <mkdir dir="${build.deps}"/>
-    <unzip src="${collections.jar}" dest="${build.deps}">
+    <unzip src="${build.lib}/commons-collections-${jar.commons-collections.version}.jar" dest="${build.deps}">
     <!--  we only want a few files from commons collections -->
       <patternset>
         <include name="org/apache/commons/collections/BoundedMap.class" />
@@ -365,9 +372,9 @@
         <include name="org/apache/commons/collections/ResettableIterator.class" />
       </patternset>
     </unzip>
-    <unzip src="${log.jar}"  dest="${build.deps}"/>
-    <unzip src="${oro.jar}"  dest="${build.deps}"/>
-    <unzip src="${lang.jar}" dest="${build.deps}"/>
+    <unzip src="${build.lib}/avalon-logkit-${jar.avalon-logkit.version}.jar"  dest="${build.deps}"/>
+    <unzip src="${build.lib}/oro-${jar.oro.version}.jar"  dest="${build.deps}"/>
+    <unzip src="${build.lib}/commons-lang-${jar.commons-lang.version}.jar" dest="${build.deps}"/>
     <delete dir="${build.deps}/META-INF" quiet="true"/>
   </target>
 
@@ -442,7 +449,7 @@
   <!-- =================================================================== -->
   <!-- Compiles the example code                                           -->
   <!-- =================================================================== -->
-  <target name="examples" depends="jar"
+  <target name="examples" depends="build-prepare,jar"
           description="Compiles the Velocity Example code">
 
     <echo>
@@ -485,7 +492,7 @@
   <!-- =================================================================== -->
   <!-- Creates the API documentation                                       -->
   <!-- =================================================================== -->
-  <target name="javadocs" depends="prepare"
+  <target name="javadocs" depends="prepare,build-prepare"
           description="Creates the Javadoc API documentation">
 
     <mkdir dir="${build.javadoc}"/>
@@ -543,6 +550,10 @@
       <fileset dir="${build.test.src}" />
     </copy>
 
+    <copy todir="${dist.dir}/lib">
+      <fileset dir="${build.lib}" />
+    </copy>
+
     <copy todir="${dist.dir}/build">
       <fileset dir="${velocity.dir}/build">
         <include name="**"/>
@@ -678,7 +689,7 @@
   <!-- Make HTML version of Velocity documentation                         -->
   <!-- =================================================================== -->
 
-  <target name="docs" depends="jar"
+  <target name="docs" depends="build-prepare,jar"
           description="Generates the Velocity HTML documentation">
 
     <taskdef name="anakia"
@@ -737,50 +748,50 @@
   <!-- =================================================================== -->
   <!-- JUnit Tests for Velocity                                            -->
   <!-- =================================================================== -->
-   <target name="test" depends="compile-test"
-           description="Run the Velocity testcases">
+  <target name="test" depends="build-prepare,compile-test"
+          description="Run the Velocity testcases">
 
-     <mkdir dir="${build.test.reports}"/>
-     <junit dir="${velocity.dir}" 
-            fork="true"
-            printSummary="yes"
-            haltonerror="${test.haltonerror}"
-            haltonfailure="${test.haltonfailure}">
-
-       <!-- Don't use the run classpath, test using the exploded class tree -->
-       <classpath>
-         <path refid="velocity.build.classpath" />
-         <pathelement path="${build.dest}"/>
-         <pathelement path="${build.test.dest}"/>
-       </classpath>
-
-       <batchtest todir="${build.test.reports}">
-         <fileset dir="${test.java.dir}">
-           <include name="**/*TestCase.java"></include>
-
-           <exclude name="**/BaseTestCase.java"></exclude>
-
-           <exclude name="**/TexenTestCase.java"></exclude>
-           <exclude name="**/TexenClasspathTestCase.java"></exclude>
-           <exclude name="**/AnakiaTestCase.java"></exclude>
-           <exclude name="**/MultiLoaderTestCase.java"></exclude>
-           <exclude name="**/ClasspathResourceTestCase.java"></exclude>
-         </fileset>
-       </batchtest>
-       <formatter type="plain"/>
-     </junit>
-
-     <!-- Run the legacy tests for anakia, texen... -->
-     <ant antfile="${velocity.build.dir}/testcases.xml"
-          target="test-all"/>
-   </target>
-
-   <target name="test-clean">
-     <delete dir="${build.test.dest}" quiet="true"/>
-     <delete dir="${build.test}" quiet="true"/>
-     <delete dir="${build.test.reports}" quiet="true"/>
+    <mkdir dir="${build.test.reports}"/>
+    <junit dir="${velocity.dir}" 
+           fork="true"
+           printSummary="yes"
+           haltonerror="${test.haltonerror}"
+           haltonfailure="${test.haltonfailure}">
 
+      <!-- Don't use the run classpath, test using the exploded class tree -->
+      <classpath>
+        <path refid="velocity.build.classpath" />
+        <pathelement path="${build.dest}"/>
+        <pathelement path="${build.test.dest}"/>
+      </classpath>
+
+      <batchtest todir="${build.test.reports}">
+        <fileset dir="${test.java.dir}">
+          <include name="**/*TestCase.java"></include>
+
+          <exclude name="**/BaseTestCase.java"></exclude>
+
+          <exclude name="**/TexenTestCase.java"></exclude>
+          <exclude name="**/TexenClasspathTestCase.java"></exclude>
+          <exclude name="**/AnakiaTestCase.java"></exclude>
+          <exclude name="**/MultiLoaderTestCase.java"></exclude>
+          <exclude name="**/ClasspathResourceTestCase.java"></exclude>
+        </fileset>
+      </batchtest>
+      <formatter type="plain"/>
+    </junit>
+
+    <!-- Run the legacy tests for anakia, texen... -->
     <ant antfile="${velocity.build.dir}/testcases.xml"
-         target="test-clean"/>
-   </target>
+         target="test-all"/>
+  </target>
+
+  <target name="test-clean">
+    <delete dir="${build.test.dest}" quiet="true"/>
+    <delete dir="${build.test}" quiet="true"/>
+    <delete dir="${build.test.reports}" quiet="true"/>
+
+   <ant antfile="${velocity.build.dir}/testcases.xml"
+        target="test-clean"/>
+  </target>
 </project>

Added: jakarta/velocity/core/trunk/build/download.xml
URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/build/download.xml?rev=329218&view=auto
==============================================================================
--- jakarta/velocity/core/trunk/build/download.xml (added)
+++ jakarta/velocity/core/trunk/build/download.xml Fri Oct 28 08:00:37 2005
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ Copyright 2000-2005 The Apache Software Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+  This file contains all the jar download targets to build Velocity.
+  Its tasks are referenced from the build.xml file and should not be
+  called directly.
+
+  This is here so that the main build file is not cluttered any further.
+-->
+
+<project name="Velocity" basedir="..">
+  <target name="build-download" description="Download all the Velocity dependencies from the central repository">
+   <mkdir dir="${build.lib}" />
+   <antcall target="antlr-download" />
+   <antcall target="avalon-logkit-download" />
+   <antcall target="bcel-download" />
+   <antcall target="commons-collections-download" />
+   <antcall target="commons-lang-download" />
+   <antcall target="jdom-download" />
+   <antcall target="junit-download" />
+   <antcall target="log4j-download" />
+   <antcall target="oro-download" />
+   <antcall target="servletapi-download" />
+   <antcall target="werken-xpath-download" />
+  </target>
+
+  <target name="http-download">
+    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
+    <get src="${repo.url}/${jarname}/jars/${jarname}-${jarversion}.jar"
+         dest="${build.lib}/${jarname}-${jarversion}.jar"
+         usetimestamp="true"
+         verbose="false"
+         ignoreerrors="false" />
+  </target>
+
+  <target name="antlr-download">
+   <property name="jarname" value="antlr" />
+   <property name="jarversion" value="${jar.antlr.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="avalon-logkit-download">
+   <property name="jarname" value="avalon-logkit" />
+   <property name="jarversion" value="${jar.avalon-logkit.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="bcel-download">
+   <property name="jarname" value="bcel" />
+   <property name="jarversion" value="${jar.bcel.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="commons-collections-download">
+   <property name="jarname" value="commons-collections" />
+   <property name="jarversion" value="${jar.commons-collections.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="commons-lang-download">
+   <property name="jarname" value="commons-lang" />
+   <property name="jarversion" value="${jar.commons-lang.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="jdom-download">
+   <property name="jarname" value="jdom" />
+   <property name="jarversion" value="${jar.jdom.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="junit-download">
+   <property name="jarname" value="junit" />
+   <property name="jarversion" value="${jar.junit.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="log4j-download">
+   <property name="jarname" value="log4j" />
+   <property name="jarversion" value="${jar.log4j.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="oro-download">
+   <property name="jarname" value="oro" />
+   <property name="jarversion" value="${jar.oro.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="servletapi-download">
+   <property name="jarname" value="servletapi" />
+   <property name="jarversion" value="${jar.servletapi.version}" />
+   <antcall target="http-download"/>
+  </target>
+
+  <target name="werken-xpath-download">
+   <property name="jarname" value="werken-xpath" />
+   <property name="jarversion" value="${jar.werken-xpath.version}" />
+   <antcall target="http-download"/>
+  </target>
+</project>
+

Propchange: jakarta/velocity/core/trunk/build/download.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/velocity/core/trunk/build/download.xml
------------------------------------------------------------------------------
    svn:keywords = Id Author Date Revision

Modified: jakarta/velocity/core/trunk/build/testcases.xml
URL: http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/build/testcases.xml?rev=329218&r1=329217&r2=329218&view=diff
==============================================================================
--- jakarta/velocity/core/trunk/build/testcases.xml (original)
+++ jakarta/velocity/core/trunk/build/testcases.xml Fri Oct 28 08:00:37 2005
@@ -33,7 +33,7 @@
 
   <!-- Build classpath -->
   <path id="velocity.test.classpath">
-    <fileset dir="${velocity.build.dir}/lib">
+    <fileset dir="${build.lib}">
       <include name="**/*.jar"/>
     </fileset>
     <pathelement location="${build.dest}"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org