logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r368289 - in /logging/sandbox/log4j/formatter: ./ build.xml
Date Thu, 12 Jan 2006 06:32:12 GMT
Author: carnold
Date: Wed Jan 11 22:32:09 2006
New Revision: 368289

URL: http://svn.apache.org/viewcvs?rev=368289&view=rev
Log:
Build fixes for Java2

Modified:
    logging/sandbox/log4j/formatter/   (props changed)
    logging/sandbox/log4j/formatter/build.xml

Propchange: logging/sandbox/log4j/formatter/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jan 11 22:32:09 2006
@@ -0,0 +1 @@
+target

Modified: logging/sandbox/log4j/formatter/build.xml
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/formatter/build.xml?rev=368289&r1=368288&r2=368289&view=diff
==============================================================================
--- logging/sandbox/log4j/formatter/build.xml (original)
+++ logging/sandbox/log4j/formatter/build.xml Wed Jan 11 22:32:09 2006
@@ -24,6 +24,7 @@
 	  <property name="classes.dir" value="${target.dir}/classes"/>
 	  <property name="classes-java2.dir" value="${target-java2.dir}/classes"/>
 	  <property name="test-classes.dir" value="${target.dir}/test-classes"/>
+	  <property name="test-classes-java2.dir" value="${target-java2.dir}/test-classes"/>
 
 	  <property name="M2_REPO" value="${user.home}/.m2/repository"/>
 	  <property name="log4j.version" value="1.2.13"/>
@@ -38,7 +39,7 @@
 	  <target name="init">
 	  </target>
 	  	
-	  <target name="compile" depends="init" description="Compile using Java 5">
+	  <target name="compile" depends="init" description="Compile for Java 5">
          <mkdir dir="${classes.dir}"/>
 	  	 <javac destdir="${classes.dir}" 
 	  	           srcdir="src/main/java"
@@ -65,10 +66,11 @@
 		  	   <replacefilter token="Long.valueOf" value="new Long"/>
 	  	  	   <replacefilter token="Double.valueOf" value="new Double"/>
 		  	   <replacefilter token="Float.valueOf" value="new Float"/>
+		  	   <replacefilter token="StringBuilder" value="StringBuffer"/>
 	  	  </replace>
 	  </target>
 	  	
-	  <target name="compile-java2" depends="prep-java2" description="Compile using Java 2">
+	  <target name="compile-java2" depends="prep-java2" description="Compile for Java 2">
        <mkdir dir="${classes-java2.dir}"/>
 	  	 <javac destdir="${classes-java2.dir}" 
 	  	           srcdir="${target.dir}/java2"
@@ -78,7 +80,7 @@
 	  		       classpath="${log4j.jar}"/>
 	  </target>
 	
-	  <target name="jar" depends="compile">	    
+	  <target name="jar" depends="compile" description="Prepare jar for Java 5">	    
 	    <delete file="${target.dir}/log4j-formatter-${version}.jar"/>
 	    <mkdir dir="${target.dir}/"/>
 	    
@@ -95,12 +97,12 @@
 	    </jar>
 	  </target>
 
-	  <target name="jar-java2" depends="compile-java2">	    
+	  <target name="jar-java2" depends="compile-java2" description="Prepare jar for Java
2">	    
 	    <delete file="${target.dir}/log4j-formatter-${version}-java2.jar"/>
 	    <mkdir dir="${target.dir}/"/>
 	    
 	    <jar jarfile="${target.dir}/log4j-formatter-${version}-java2.jar" 
-	    	 basedir="${classes.dir}">
+	    	 basedir="${classes-java2.dir}">
 	      <manifest>
 	        <attribute name="Manifest-version" value="1.0"/>
 	        <section name="org/apache/log4j/formatter/">
@@ -112,8 +114,19 @@
 	    </jar>
 	  </target>
 
-	  <target name="testCompile" depends="compile" description="Compile tests">
-       <mkdir dir="${test-classes.dir}"/>
+	  <target name="testCompile-java2" depends="compile-java2" description="Compile tests
for Java2">
+         <mkdir dir="${test-classes-java2.dir}"/>
+	  	 <javac destdir="${test-classes-java2.dir}" 
+	  	           srcdir="src/test/java"
+	  			   includes="**/*.java"
+	  	 	       excludes="**/LogFTest*.java **/LogFTraceTest.java"
+	  	           source="1.3"
+	  	           target="1.3"
+	  		       classpath="${classes-java2.dir};${log4j.jar};${junit.jar}"/>
+	  </target>
+
+ 	  <target name="testCompile" depends="compile" description="Compile tests for Java 5">
+         <mkdir dir="${test-classes.dir}"/>
 	  	 <javac destdir="${test-classes.dir}" 
 	  	           srcdir="src/test/java"
 	  			   includes="**/*.java"
@@ -121,8 +134,7 @@
 	  	           source="1.3"
 	  	           target="1.3"
 	  		       classpath="${classes.dir};${log4j.jar};${junit.jar}"/>
-	       <mkdir dir="${test-classes.dir}"/>
-		  	 <javac destdir="${test-classes.dir}" 
+		 <javac destdir="${test-classes.dir}" 
 		  	           srcdir="src/test/java"
 		  	 	       includes="**/LogFTest*.java **/LogFTraceTest.java"
 		  	           source="1.5"
@@ -130,7 +142,7 @@
 		  		       classpath="${classes.dir};${log4j.jar};${junit.jar}"/>
 	  </target>
 	
-	  <target name="test" depends="testCompile">
+	  <target name="test" depends="testCompile" description="Run tests for Java 5">
 	    <junit printsummary="yes" 
 	    	fork="yes">
 	  	  <classpath path="${test-classes.dir};${classes.dir};${log4j.jar};${junit.jar}"/>
@@ -143,10 +155,11 @@
 	    </junit>
 	  </target>
 
-	  <target name="test-java2" depends="compile-java2, testCompile">
+	  <target name="test-java2" depends="compile-java2, testCompile-java2" 
+	       description="Run tests for Java 2">
 	    <junit printsummary="yes" 
 	    	fork="yes">
-	  	  <classpath path="${test-classes.dir};${classes-java2.dir};${log4j.jar};${junit.jar}"/>
+	  	  <classpath path="${test-classes-java2.dir};${classes-java2.dir};${log4j.jar};${junit.jar}"/>
 	  	  <formatter type="plain" usefile="false"/>
 	  	  <batchtest>
 	  	    <fileset dir="src/test/java" 
@@ -156,7 +169,7 @@
 	    </junit>
 	  </target>
 	
-	 <target name="javadoc">	    
+	 <target name="javadoc" description="Prepare Javadocs for Java 5">	    
 	    <mkdir dir="${target.dir}/javadoc" />	    
 	    <javadoc
 	             destdir="${target.dir}/javadoc"
@@ -175,7 +188,8 @@
 	    </javadoc>
 	 </target>
 	
-	  <target name="dist" depends="test, jar, test-java2, jar-java2, javadoc">
+	  <target name="dist" depends="test, jar, test-java2, jar-java2, javadoc"
+	     description="Prepare distribution (both Java 2 and 5)">
 	    <tar tarfile="${target.dir}/logging-log4j-formatter-${version}.tar.gz"
 	         compression="gzip"
 	         longfile="gnu">



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


Mime
View raw message