commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject svn commit: r293155 - /jakarta/commons/proper/io/trunk/build.xml
Date Sun, 02 Oct 2005 20:03:10 GMT
Author: scolebourne
Date: Sun Oct  2 13:03:06 2005
New Revision: 293155

URL: http://svn.apache.org/viewcvs?rev=293155&view=rev
Log:
Update ant build file for version 1.1

Modified:
    jakarta/commons/proper/io/trunk/build.xml

Modified: jakarta/commons/proper/io/trunk/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/build.xml?rev=293155&r1=293154&r2=293155&view=diff
==============================================================================
--- jakarta/commons/proper/io/trunk/build.xml (original)
+++ jakarta/commons/proper/io/trunk/build.xml Sun Oct  2 13:03:06 2005
@@ -1,32 +1,52 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!--build.xml generated by maven from project.xml version 1.1-dev
-  on date October 24 2004, time 1323-->
+<!--
+ Based on maven generated file on date October 1 2005
+ Added overview to javadoc
+ Include license in jar
+ Changed dist target and structure
+ -->
 
 <project default="jar" name="commons-io" basedir=".">
-  <property name="defaulttargetdir" value="target">
+  <!--Load local and user build preferences-->
+
+  <property file="build.properties">
+  </property>
+  <property file="${user.home}/build.properties">
+  </property>
+  <!--Build properties-->
+
+  <property name="defaulttargetdir" value="${basedir}/target">
   </property>
-  <property name="libdir" value="target/lib">
+  <property name="libdir" value="${user.home}/.maven/repository">
   </property>
-  <property name="classesdir" value="target/classes">
+  <property name="classesdir" value="${basedir}/target/classes">
   </property>
-  <property name="testclassesdir" value="target/test-classes">
+  <property name="testclassesdir" value="${basedir}/target/test-classes">
   </property>
-  <property name="testclassesdir" value="target/test-classes">
+  <property name="testreportdir" value="${basedir}/target/test-reports">
   </property>
-  <property name="testreportdir" value="target/test-reports">
+  <property name="final.name" value="commons-io-1.1" />
+  <property name="dist.build.dir" value="${basedir}/target/dist-build" />
+  <property name="dist.bin" value="${dist.build.dir}/${final.name}" />
+  <property name="dist.src" value="${dist.build.dir}/${final.name}-src" />
+  <property name="javadocdir" value="${dist.bin}/docs" />
+  <property name="dist.zip.dir" value="${basedir}/target/dist" />
+  <property name="dist.bin.tar.name" value="${basedir}/target/dist/${final.name}.tar"
/>
+  <property name="dist.bin.gz.name" value="${basedir}/target/dist/${final.name}.tar.gz"
/>
+  <property name="dist.bin.zip.name" value="${basedir}/target/dist/${final.name}.zip"
/>
+  <property name="dist.src.tar.name" value="${basedir}/target/dist/${final.name}-src.tar"
/>
+  <property name="dist.src.gz.name" value="${basedir}/target/dist/${final.name}-src.tar.gz"
/>
+  <property name="dist.src.zip.name" value="${basedir}/target/dist/${final.name}-src.zip"
/>
+  <property name="proxy.host" value="">
   </property>
-  <property name="distdir" value="dist">
+  <property name="proxy.port" value="">
   </property>
-  <property name="javadocdir" value="dist/docs/api">
+  <property name="proxy.username" value="">
   </property>
-  <property name="final.name" value="commons-io-1.1-dev">
+  <property name="proxy.password" value="">
   </property>
   <path id="build.classpath">
-    <fileset dir="${libdir}">
-      <include name="**/*.jar">
-      </include>
-    </fileset>
   </path>
   <target name="init" description="o Initializes some properties">
     <mkdir dir="${libdir}">
@@ -39,24 +59,35 @@
 
     <available property="Junit.present" classname="junit.framework.Test">
     </available>
+    <!--Test if user defined a proxy-->
+
+    <condition property="useProxy">
+      <and>
+        <isset property="proxy.host">
+        </isset>
+        <not>
+          <equals trim="true" arg2="" arg1="${proxy.host}">
+          </equals>
+        </not>
+      </and>
+    </condition>
   </target>
   <target name="compile" description="o Compile the code" depends="get-deps">
     <mkdir dir="${classesdir}">
     </mkdir>
     <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
       <src>
-        <pathelement location="src/java">
+        <pathelement location="${basedir}/src/java">
         </pathelement>
       </src>
       <classpath refid="build.classpath">
       </classpath>
     </javac>
-    <mkdir dir="${classesdir}/META-INF">
-    </mkdir>
+    <mkdir dir="${classesdir}/META-INF" />
     <copy todir="${classesdir}/META-INF">
-      <fileset dir=".">
-        <include name="NOTICE.txt">
-        </include>
+      <fileset dir="${basedir}/.">
+        <include name="LICENSE.txt" />
+        <include name="NOTICE.txt" />
       </fileset>
     </copy>
   </target>
@@ -67,19 +98,59 @@
   <target name="clean" description="o Clean up the generated directories">
     <delete dir="${defaulttargetdir}">
     </delete>
-    <delete dir="${distdir}">
+    <delete dir="${dist.bin}">
     </delete>
   </target>
+
   <target name="dist" description="o Create a distribution" depends="jar, javadoc">
-    <mkdir dir="dist">
-    </mkdir>
-    <copy todir="dist">
+    <mkdir dir="${dist.bin}" />
+    <mkdir dir="${dist.zip.dir}" />
+  	<!-- Binary -->
+    <copy todir="${dist.bin}">
       <fileset dir="${defaulttargetdir}" includes="*.jar">
       </fileset>
-      <fileset dir="${basedir}" includes="LICENSE*, README*">
+      <fileset dir="${basedir}" includes="LICENSE*, NOTICE*, README*, RELEASE-NOTES*">
       </fileset>
     </copy>
+    <!-- Unix tar gz binary -->
+  	<fixcrlf srcdir="${dist.bin}" eol="lf" includes="*.txt" />
+    <tar longfile="gnu" tarfile="${dist.bin.tar.name}">
+      <tarfileset dir="${dist.build.dir}"/>
+    </tar>
+    <gzip zipfile="${dist.bin.gz.name}" src="${dist.bin.tar.name}"/>
+    <checksum file="${dist.bin.gz.name}"/>
+    <delete file="${dist.bin.tar.name}" />
+    <!-- Windows zip binary -->
+  	<fixcrlf srcdir="${dist.bin}" eol="crlf" includes="*.txt" />
+    <zip zipfile="${dist.bin.zip.name}" >
+      <zipfileset dir="${dist.build.dir}"/>
+    </zip>
+    <checksum file="${dist.bin.zip.name}"/>
+  	<!-- Source -->
+    <delete dir="${dist.bin}" />
+    <copy todir="${dist.src}">
+      <fileset dir="${defaulttargetdir}" includes="*.jar" />
+      <fileset dir="${basedir}" includes="LICENSE*, NOTICE*, README*, RELEASE-NOTES*,
build.xml, checkstyle.xml, maven.xml, project.properties, project.xml" />
+      <fileset dir="${basedir}" includes="xdocs/**, src/**" />
+    </copy>
+    <!-- Unix tar gz source -->
+  	<fixcrlf srcdir="${dist.src}" eol="lf"  includes="*.txt,*.xml,*.css" />
+    <tar longfile="gnu" tarfile="${dist.src.tar.name}">
+      <tarfileset dir="${dist.build.dir}"/>
+    </tar>
+    <gzip zipfile="${dist.src.gz.name}" src="${dist.src.tar.name}"/>
+    <checksum file="${dist.src.gz.name}"/>
+    <delete file="${dist.src.tar.name}" />
+    <!-- Windows zip source -->
+  	<fixcrlf srcdir="${dist.src}" eol="crlf" includes="*.txt,*.xml,*.css" />
+    <zip zipfile="${dist.src.zip.name}" >
+      <zipfileset dir="${dist.build.dir}"/>
+    </zip>
+    <checksum file="${dist.src.zip.name}"/>
+  	<!-- Tidy -->
+    <delete dir="${dist.build.dir}" />
   </target>
+
   <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
     <fail message="There were test failures.">
     </fail>
@@ -87,7 +158,7 @@
   <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
     <mkdir dir="${testreportdir}">
     </mkdir>
-    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
+    <junit dir="${basedir}" failureproperty="test.failure" printSummary="yes" fork="true"
haltonerror="true">
       <sysproperty key="basedir" value=".">
       </sysproperty>
       <formatter type="xml">
@@ -103,7 +174,7 @@
         </pathelement>
       </classpath>
       <batchtest todir="${testreportdir}">
-        <fileset dir="src/test">
+        <fileset dir="${basedir}/src/test">
           <include name="**/*Test*">
           </include>
           <exclude name="**/*AbstractTestCase*">
@@ -126,7 +197,7 @@
     </mkdir>
     <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false"
excludes="**/package.html">
       <src>
-        <pathelement location="src/test">
+        <pathelement location="${basedir}/src/test">
         </pathelement>
       </src>
       <classpath>
@@ -146,22 +217,29 @@
     </tstamp>
     <property name="copyright" value="Copyright &amp;copy;  The Apache Software Foundation.
All Rights Reserved.">
     </property>
-    <property name="title" value="IO 1.1-dev API">
+    <property name="title" value="IO 1.1">
     </property>
-    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true"
sourcepath="src/java" packagenames="org.apache.commons.io.*">
+    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true"
sourcepath="${basedir}/src/java" packagenames="org.apache.commons.io.*" overview="src/java/org/apache/commons/io/overview.html">
       <classpath>
         <path refid="build.classpath">
         </path>
       </classpath>
     </javadoc>
   </target>
-  <target name="get-deps" unless="noget" depends="init">
+  <target name="get-deps" unless="noget">
+  </target>
+  <target name="setProxy" if="useProxy" depends="init">
     <!--Proxy settings works only with a JDK 1.2 and higher.-->
 
-    <setproxy>
+    <echo>Proxy used :</echo>
+    <echo>Proxy host [${proxy.host}]</echo>
+    <echo>Proxy port [${proxy.port}]</echo>
+    <echo>Proxy user [${proxy.username}]</echo>
+    <setproxy proxyuser="${proxy.username}" proxyport="${proxy.port}" proxypassword="${proxy.password}"
proxyhost="${proxy.host}">
     </setproxy>
-    <get dest="${libdir}/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar">
-    </get>
+  </target>
+  <target name="noProxy" unless="useProxy" depends="init">
+    <echo>Proxy not used.</echo>
   </target>
   <target name="install-maven">
     <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">



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


Mime
View raw message