velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wgl...@apache.org
Subject svn commit: r509923 - in /velocity/engine/branches/Velocity_1.5_BRANCH/build: build.properties build.xml
Date Wed, 21 Feb 2007 07:14:47 GMT
Author: wglass
Date: Tue Feb 20 23:14:46 2007
New Revision: 509923

URL: http://svn.apache.org/viewvc?view=rev&rev=509923
Log:
require JDK 1.4 for distribution build

Modified:
    velocity/engine/branches/Velocity_1.5_BRANCH/build/build.properties
    velocity/engine/branches/Velocity_1.5_BRANCH/build/build.xml

Modified: velocity/engine/branches/Velocity_1.5_BRANCH/build/build.properties
URL: http://svn.apache.org/viewvc/velocity/engine/branches/Velocity_1.5_BRANCH/build/build.properties?view=diff&rev=509923&r1=509922&r2=509923
==============================================================================
--- velocity/engine/branches/Velocity_1.5_BRANCH/build/build.properties (original)
+++ velocity/engine/branches/Velocity_1.5_BRANCH/build/build.properties Tue Feb 20 23:14:46
2007
@@ -71,6 +71,10 @@
 dist.root= ${build.dir}/dist
 dist.dir= ${dist.root}/${final.name}
 
+# required Java version for building the distribution
+# should be major distribution (e.g. 1.4) will match property ${ant.java.version}
+dist.required.java.version = 1.4
+
 # Set to "project.xml" for distribution and "project-website.xml"
 # when building docs for web site
 docs.project= project.xml

Modified: velocity/engine/branches/Velocity_1.5_BRANCH/build/build.xml
URL: http://svn.apache.org/viewvc/velocity/engine/branches/Velocity_1.5_BRANCH/build/build.xml?view=diff&rev=509923&r1=509922&r2=509923
==============================================================================
--- velocity/engine/branches/Velocity_1.5_BRANCH/build/build.xml (original)
+++ velocity/engine/branches/Velocity_1.5_BRANCH/build/build.xml Tue Feb 20 23:14:46 2007
@@ -582,17 +582,17 @@
     <mkdir dir="${dist.dir}"/>
     <mkdir dir="${dist.dir}/src/java"/>
 
-  	<!-- use original to get pre-filtered text -->
+    <!-- use original to get pre-filtered text -->
     <copy todir="${dist.dir}/src/java/">
       <fileset dir="${src.java.dir}" />
     </copy>
 
-  	<!-- use original to get pre-filtered text -->
+    <!-- use original to get pre-filtered text -->
     <copy todir="${dist.dir}/src/test/">
       <fileset dir="${test.java.dir}" />
     </copy>
 
-  	<!-- use original to get pre-filtered text -->
+    <!-- use original to get pre-filtered text -->
     <copy todir="${dist.dir}/src/parser/">
       <fileset dir="${src.parser.dir}" />
     </copy>
@@ -728,10 +728,37 @@
   <!-- Packages the distribution with ZIP and TAG-GZIP                    -->
   <!-- ================================================================== -->
   <target name="package"
-          depends="package-zip,package-tgz"
+          depends="package-java-check,package-zip,package-tgz"
           description="Generates the Velocity distribution files">
   </target>
 
+  <target name="package-java-check">
+      <condition property="correct-java-version">
+        <equals arg1="${ant.java.version}" arg2="${dist.required.java.version}"/>
+      </condition>
+  
+      <fail unless="correct-java-version">
+        Could not run create distribution package:
+    ***********************************************************
+    **
+    ** In order to create a distribution package, you must be
+    ** using Java version ${dist.required.java.version} instead
+    ** of Java version ${java.version}
+    **
+    ***********************************************************
+      </fail>
+
+      <echo>
+    ***********************************************************
+    **
+    ** Creating a distribution package.  Compiling with 
+    ** Java version ${java.version}
+    **
+    ***********************************************************
+      </echo>
+
+  </target>
+  
   <!-- ======================================================================= -->
   <!-- Cleans up the build directory. Leave Libs unharmed to avoid re-download -->
   <!-- ======================================================================= -->



Mime
View raw message