summaryrefslogtreecommitdiff
blob: 80348a3cfc15fe67d05e4eaa900d900a49234232 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
--- build.xml	2003-10-22 21:12:59.000000000 -0500
+++ build.xml.patched	2004-02-28 13:04:14.563419552 -0500
@@ -6,6 +6,14 @@
 -->
 
 <project default="jar" name="commons-net" basedir=".">
+  <path id="compile.classpath">
+  <pathelement location="target/classes"/>
+  <pathelement location="target/test-classes"/>
+  <pathelement location="target/test-reports"/>
+  <pathelement location="${oro.jar}"/>
+  <pathelement location="${junit.jar}"/>
+  </path>
+
   <property name="defaulttargetdir" value="target">
   </property>
   <property name="libdir" value="target/lib">
@@ -25,12 +33,8 @@
   <target name="init" description="o Initializes some properties">
     <mkdir dir="${libdir}">
     </mkdir>
-    <condition property="noget">
-      <equals arg2="only" arg1="${build.sysclasspath}">
-      </equals>
-    </condition>
   </target>
-  <target name="compile" description="o Compile the code" depends="get-deps">
+  <target name="compile" description="o Compile the code">
     <mkdir dir="${classesdir}">
     </mkdir>
     <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
@@ -38,15 +42,10 @@
         <pathelement location="src/java">
         </pathelement>
       </src>
-      <classpath>
-        <fileset dir="${libdir}">
-          <include name="*.jar">
-          </include>
-        </fileset>
-      </classpath>
+      <classpath refid="compile.classpath"/>
     </javac>
   </target>
-  <target name="jar" description="o Create the jar" depends="compile,test">
+  <target name="jar" description="o Create the jar" depends="compile">
     <jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
     </jar>
   </target>
@@ -73,23 +72,12 @@
   <target name="internal-test" depends="compile-tests">
     <mkdir dir="${testreportdir}">
     </mkdir>
-    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
-      <sysproperty key="basedir" value=".">
-      </sysproperty>
+    <junit>
+      <classpath refid="compile.classpath"/>
       <formatter type="xml">
       </formatter>
       <formatter usefile="false" type="plain">
       </formatter>
-      <classpath>
-        <fileset dir="${libdir}">
-          <include name="*.jar">
-          </include>
-        </fileset>
-        <pathelement path="${testclassesdir}">
-        </pathelement>
-        <pathelement path="${classesdir}">
-        </pathelement>
-      </classpath>
       <batchtest todir="${testreportdir}">
         <fileset dir="src/test">
           <include name="**/*Test.java">
@@ -108,14 +96,7 @@
         <pathelement location="src/test">
         </pathelement>
       </src>
-      <classpath>
-        <fileset dir="${libdir}">
-          <include name="*.jar">
-          </include>
-        </fileset>
-        <pathelement path="${classesdir}">
-        </pathelement>
-      </classpath>
+      <classpath refid="compile.classpath"/>
     </javac>
   </target>
   <target name="javadoc" description="o Generate javadoc" depends="jar">
@@ -130,30 +111,13 @@
     <property name="title" value="Jakarta Commons/Net 1.0.1-dev API">
     </property>
     <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.commons.net.*">
-      <classpath>
-        <fileset dir="${libdir}">
-          <include name="*.jar">
-          </include>
-        </fileset>
-        <pathelement location="target/${final.name}.jar">
-        </pathelement>
-      </classpath>
+      <classpath refid="compile.classpath"/>
     </javadoc>
   </target>
-  <target name="get-deps" unless="noget" depends="init">
-    <get dest="${libdir}/oro-2.0.7.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/oro/jars/oro-2.0.7.jar">
-    </get>
-    <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>
-    <get dest="${libdir}/ant-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar">
-    </get>
-    <get dest="${libdir}/ant-optional-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-optional-1.5.jar">
-    </get>
-  </target>
   <target name="install-maven">
     <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">
     </get>
     <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
     </unjar>
   </target>
-</project>
\ No newline at end of file
+</project>