commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r546335 - /jakarta/commons/proper/cli/branches/cli-1.0.x/build.xml
Date Tue, 12 Jun 2007 00:46:20 GMT
Author: bayard
Date: Mon Jun 11 17:46:20 2007
New Revision: 546335

URL: http://svn.apache.org/viewvc?view=rev&rev=546335
Log:
Updating 'maven ant'

Modified:
    jakarta/commons/proper/cli/branches/cli-1.0.x/build.xml

Modified: jakarta/commons/proper/cli/branches/cli-1.0.x/build.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/cli/branches/cli-1.0.x/build.xml?view=diff&rev=546335&r1=546334&r2=546335
==============================================================================
--- jakarta/commons/proper/cli/branches/cli-1.0.x/build.xml (original)
+++ jakarta/commons/proper/cli/branches/cli-1.0.x/build.xml Mon Jun 11 17:46:20 2007
@@ -1,32 +1,44 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--build.xml generated by maven from project.xml version 1.1-SNAPSHOT
-  on date May 28 2007, time 0053-->
+  on date June 11 2007, time 1738-->
 
 <project default="jar" name="commons-cli" basedir=".">
-  <property name="defaulttargetdir" value="target">
+  <!--Load local and user build preferences-->
+
+  <property file="build.properties">
+  </property>
+  <property file="${user.home}/build.properties">
   </property>
-  <property name="libdir" value="target/lib">
+  <!--Build properties-->
+
+  <property name="defaulttargetdir" value="${basedir}/target">
   </property>
-  <property name="classesdir" value="target/classes">
+  <property name="libdir" value="${user.home}/.maven/repository">
   </property>
-  <property name="testclassesdir" value="target/test-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="testreportdir" value="target/test-reports">
+  <property name="testreportdir" value="${basedir}/target/test-reports">
   </property>
-  <property name="distdir" value="dist">
+  <property name="distdir" value="${basedir}/dist">
   </property>
-  <property name="javadocdir" value="dist/docs/api">
+  <property name="javadocdir" value="${basedir}/dist/docs/api">
   </property>
   <property name="final.name" value="commons-cli-1.1-SNAPSHOT">
   </property>
+  <property name="proxy.host" value="">
+  </property>
+  <property name="proxy.port" value="">
+  </property>
+  <property name="proxy.username" value="">
+  </property>
+  <property name="proxy.password" value="">
+  </property>
   <path id="build.classpath">
-    <fileset dir="${libdir}">
-      <include name="**/*.jar">
-      </include>
-    </fileset>
+    <pathelement location="${libdir}/junit/jars/junit-3.8.1.jar">
+    </pathelement>
   </path>
   <target name="init" description="o Initializes some properties">
     <mkdir dir="${libdir}">
@@ -39,13 +51,25 @@
 
     <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">
@@ -79,7 +103,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">
@@ -95,9 +119,7 @@
         </pathelement>
       </classpath>
       <batchtest todir="${testreportdir}">
-        <fileset dir="src/test">
-          <include name="**/Test*.java">
-          </include>
+        <fileset dir="${basedir}/src/test">
           <include name="**/*Test.java">
           </include>
         </fileset>
@@ -114,7 +136,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>
@@ -136,20 +158,39 @@
     </property>
     <property name="title" value="CLI 1.1-SNAPSHOT API">
     </property>
-    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true"
sourcepath="src/java" packagenames="org.apache.commons.*">
+    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true"
sourcepath="${basedir}/src/java" packagenames="org.apache.commons.*">
       <classpath>
         <path refid="build.classpath">
         </path>
       </classpath>
     </javadoc>
   </target>
-  <target name="get-deps" unless="noget" depends="init">
+  <target name="get-dep-junit.jar" description="o Download the dependency : junit.jar"
unless="junit.jar" depends="init,setProxy,noProxy,get-custom-dep-junit.jar">
+    <mkdir dir="${libdir}/junit/jars/">
+    </mkdir>
+    <get dest="${libdir}/junit/jars/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"
src="http://repo1.maven.org/maven/junit/jars/junit-3.8.1.jar">
+    </get>
+  </target>
+  <target name="get-custom-dep-junit.jar" if="junit.jar" depends="init,setProxy,noProxy">
+    <mkdir dir="${libdir}/junit/jars/">
+    </mkdir>
+    <get dest="${libdir}/junit/jars/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"
src="${junit.jar}">
+    </get>
+  </target>
+  <target name="get-deps" unless="noget" depends="get-dep-junit.jar">
+  </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://repo1.maven.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