You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2006/01/24 22:09:54 UTC
svn commit: r372020 - in /jakarta/commons/proper/logging/trunk: ./
build.properties.sample build.xml
Author: rdonkin
Date: Tue Jan 24 13:09:51 2006
New Revision: 372020
URL: http://svn.apache.org/viewcvs?rev=372020&view=rev
Log:
Updated dist method to reflect modern practice. Added optional isolated compilation for releases (requires a pre-1.4 JVM to run the ant tasks and the executable.javac1.4 build property to be set). Artifacts are built in new subdirectory with file ending standardisation. Ant lacks a svn task so will consider whether the source artifacts should also be created by dist.
Modified:
jakarta/commons/proper/logging/trunk/ (props changed)
jakarta/commons/proper/logging/trunk/build.properties.sample
jakarta/commons/proper/logging/trunk/build.xml
Propchange: jakarta/commons/proper/logging/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jan 24 13:09:51 2006
@@ -8,3 +8,5 @@
.project
.classpath
.repositoryIndex
+*.tar.gz
+*.zip
Modified: jakarta/commons/proper/logging/trunk/build.properties.sample
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/build.properties.sample?rev=372020&r1=372019&r2=372020&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/build.properties.sample (original)
+++ jakarta/commons/proper/logging/trunk/build.properties.sample Tue Jan 24 13:09:51 2006
@@ -38,3 +38,8 @@
# Those committers using agents may like to use
#maven.username=rdonkin
#logging.cvs=lserver:rdonkin@cvs.apache.org:/home/cvs
+
+
+# The path to a 1.4 JSDK javac
+# Optional - used when building with a 1.2 JVM for releases
+# executable.javac1.4=/opt/java/jdks/j2sdk1.4.2_10/bin/javac
Modified: jakarta/commons/proper/logging/trunk/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/build.xml?rev=372020&r1=372019&r2=372020&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/build.xml (original)
+++ jakarta/commons/proper/logging/trunk/build.xml Tue Jan 24 13:09:51 2006
@@ -33,6 +33,11 @@
- * run ant as "ant -lib path-to-junit-jar"
- * put the junit jar in $CLASSPATH
-
+ - Note when building JCL for release it is strongly recommended that a 1.2 JVM
+ - is used for the main compile and the home.jdk4 property used to specify
+ - the path to a 1.4 J2SDK. This will be used to compile those classes
+ - which require the 1.4 API.
+ -
- $Id$
-->
@@ -97,6 +102,9 @@
<!-- The base directory for distribution targets -->
<property name="dist.home" value="dist"/>
+
+ <!-- The base directory for releases -->
+ <property name="artifacts.home" value="artifacts"/>
<!-- The base directory for component sources -->
<property name="source.home" value="src/java"/>
@@ -104,11 +112,14 @@
<!-- The base directory for unit test sources -->
<property name="test.home" value="src/test"/>
-
<!-- jar names -->
<property name="core.jar.name" value="commons-${component.name}-${component.version}.jar"/>
<property name="api.jar.name" value="commons-${component.name}-api-${component.version}.jar"/>
<property name="adapters.jar.name" value="commons-${component.name}-adapters-${component.version}.jar"/>
+
+ <!-- dist names -->
+ <property name="windows.dist.name" value="commons-${component.name}-${component.version}.zip"/>
+ <property name="nix.dist.name" value="commons-${component.name}-${component.version}.tar.gz"/>
<!-- ========== Compiler Defaults ========================================= -->
@@ -236,8 +247,6 @@
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/classes"/>
<mkdir dir="${build.home}/conf"/>
- <mkdir dir="${build.home}/docs"/>
- <mkdir dir="${build.home}/docs/api"/>
<mkdir dir="${build.home}/tests"/>
</target>
@@ -313,7 +322,7 @@
</target>
<target name='warning'
- depends='log4j12-warning,log4j13-warning,logkit-warning,jdk1.4-warning,avalon-framework-warning'/>
+ depends='log4j12-warning,log4j13-warning,logkit-warning,jdk1.4-warning,avalon-framework-warning,compile-1.4'/>
<target name="compile-only"
depends="prepare,discovery,warning,show-lib-presence,compile-non-log4j,compile-log4j12,compile-log4j13,build-jar"/>
@@ -350,6 +359,38 @@
unless="avalon-framework.present"/>
</javac>
</target>
+
+ <target name="compile-1.4" depends="prepare,discovery,compile-non-log4j" if='executable.javac1.4'>
+ <!--
+Compiles those classes which require a 1.4+ JSDK.
+This target will only be executed when ant is running a pre-1.4 JVM
+and the home.jdk4 property is set.
+This configuration is typically used to create a release only.
+ -->
+ <echo message=""/>
+ <echo message="************************************************************"/>
+ <echo message=" Compiling 1.4 only classes using compiler@${executable.javac1.4}"/>
+ <echo message="************************************************************"/>
+ <echo message=""/>
+ <javac srcdir="${source.home}"
+ destdir="${build.home}/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}"
+ source="${source.version}"
+ target="${target.version}"
+ compiler='javac1.4'
+ fork='yes'
+ executable='${executable.javac1.4}'>
+
+ <classpath refid="compile.classpath"/>
+
+ <include name="org/apache/commons/logging/impl/Jdk13LumberjackLogger.java"
+ unless="jdk.1.4.present"/>
+ <include name="org/apache/commons/logging/impl/Jdk14Logger.java"
+ unless="jdk.1.4.present"/>
+ </javac>
+ </target>
<target name="compile-log4j12" depends="prepare,discovery">
<!-- compile the log4j1.2 support classes -->
@@ -523,8 +564,11 @@
<target name="clean"
description="Clean build and distribution directories">
- <delete dir="${build.home}"/>
+ <delete includeemptydirs='yes'>
+ <fileset dir="${build.home}" excludes='docs/**/*'/>
+ </delete>
<delete dir="${dist.home}"/>
+ <delete dir="${artifacts.home}"/>
</target>
@@ -532,7 +576,7 @@
description="Clean and compile all components"/>
- <target name="dist" depends="compile"
+ <target name="dist" depends="all"
description="Create binary distribution">
<!--
@@ -560,6 +604,26 @@
<mkdir dir="${dist.home}/src"/>
<copy todir="${dist.home}/src" filtering="on">
<fileset dir="${source.home}"/>
+ </copy>
+ <mkdir dir="${dist.home}/docs"/>
+ <copy todir="${dist.home}/docs">
+ <fileset dir="${build.home}/docs"/>
+ </copy>
+ <mkdir dir="${artifacts.home}"/>
+ <fixcrlf srcdir='${dist.home}' eol='dos' includes='**/*.txt,**/*.java,**/*.html'/>
+ <zip destfile='${artifacts.home}/${windows.dist.name}'>
+ <zipfileset dir='${dist.home}' prefix='commons-${component.name}-${component.version}'/>
+ </zip>
+ <fixcrlf srcdir='${dist.home}' eol='unix' includes='**/*.txt,**/*.java,**/*.html'/>
+ <tar compression="gzip" destfile='${artifacts.home}/${nix.dist.name}'>
+ <tarfileset dir='${dist.home}' prefix='commons-${component.name}-${component.version}'/>
+ </tar>
+ <copy todir="${artifacts.home}">
+ <fileset dir="${build.home}">
+ <include name="${core.jar.name}"/>
+ <include name="${api.jar.name}"/>
+ <include name="${adapters.jar.name}"/>
+ </fileset>
</copy>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org