Skip to content

Commit 732b7c5

Browse files
author
Timothy O'Brien
committed
Ant build file is now generated with maven via the ant:generate-build target
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/codec/trunk@130154 13f79535-47bb-0310-9956-ffa450edef68
1 parent 727432f commit 732b7c5

1 file changed

Lines changed: 163 additions & 105 deletions

File tree

build.xml

Lines changed: 163 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,163 @@
1-
<project name="Codec" default="compile" basedir=".">
2-
<!--
3-
"Codec" component of the Jakarta Commons Subproject
4-
$Id: build.xml,v 1.5 2003/05/30 00:50:47 ggregory Exp $
5-
-->
6-
<!-- ========== Initialize Properties ===================================== -->
7-
<property file="${user.home}/${component.name}.build.properties"/>
8-
<property file="${user.home}/build.properties"/>
9-
<property file="${basedir}/build.properties"/>
10-
<property file="${basedir}/default.properties"/>
11-
<!-- ========== Construct compile classpath =============================== -->
12-
<path id="compile.classpath">
13-
<pathelement location="${build.home}/classes"/>
14-
</path>
15-
<!-- ========== Construct unit test classpath ============================= -->
16-
<path id="test.classpath">
17-
<pathelement location="${build.home}/classes"/>
18-
<pathelement location="${build.home}/tests"/>
19-
<pathelement location="${junit.jar}"/>
20-
</path>
21-
<!-- ========== Executable Targets ======================================== -->
22-
<target name="init" description="Initialize and evaluate conditionals">
23-
<echo message="-------- ${component.name} ${component.version} --------"/>
24-
<filter token="name" value="${component.name}"/>
25-
<filter token="package" value="${component.package}"/>
26-
<filter token="version" value="${component.version}"/>
27-
</target>
28-
<target name="prepare" depends="init" description="Prepare build directory">
29-
<mkdir dir="${build.home}"/>
30-
<mkdir dir="${build.home}/classes"/>
31-
<mkdir dir="${build.home}/conf"/>
32-
<mkdir dir="${build.home}/tests"/>
33-
<mkdir dir="${build.home}/test-reports"/>
34-
</target>
35-
<target name="static" depends="prepare" description="Copy static files to build directory">
36-
<tstamp/>
37-
<copy todir="${build.home}/conf" filtering="on">
38-
<fileset dir="${conf.home}" includes="*.MF"/>
39-
</copy>
40-
</target>
41-
<target name="compile" depends="static" description="Compile shareable components">
42-
<javac srcdir="${source.home}" destdir="${build.home}/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
43-
<classpath refid="compile.classpath"/>
44-
</javac>
45-
<copy todir="${build.home}/classes" filtering="on">
46-
<fileset dir="${source.home}" excludes="**/*.java"/>
47-
</copy>
48-
</target>
49-
<target name="clean" description="Clean build and distribution directories">
50-
<delete dir="${build.home}"/>
51-
<delete dir="${dist.home}"/>
52-
</target>
53-
<target name="all" depends="clean,compile" description="Clean and compile all components"/>
54-
<target name="javadoc" depends="compile" description="Create component Javadoc documentation">
55-
<mkdir dir="${dist.home}"/>
56-
<mkdir dir="${dist.home}/docs"/>
57-
<mkdir dir="${dist.home}/docs/api"/>
58-
<javadoc sourcepath="${source.home}" destdir="${dist.home}/docs/api" packagenames="org.apache.commons.*" author="true" private="true" version="true" doctitle="&lt;h1&gt;${component.title}&lt;/h1&gt;" windowtitle="${component.title} (Version ${component.version})" bottom="Copyright &amp;copy; 2003 - Apache Software Foundation" use="true">
59-
<classpath refid="compile.classpath"/>
60-
</javadoc>
61-
</target>
62-
<target name="dist" depends="compile,javadoc" description="Create binary distribution">
63-
<mkdir dir="${dist.home}"/>
64-
<copy file="../LICENSE" todir="${dist.home}"/>
65-
<copy file="${basedir}/RELEASE-NOTES.txt" todir="${dist.home}"/>
66-
<antcall target="jar"/>
67-
</target>
68-
<target name="jar" depends="compile" description="Create jar">
69-
<mkdir dir="${dist.home}"/>
70-
<mkdir dir="${build.home}/classes/META-INF"/>
71-
<copy file="../LICENSE" tofile="${build.home}/classes/META-INF/LICENSE.txt"/>
72-
<jar jarfile="${dist.home}/${final.name}.jar" basedir="${build.home}/classes" manifest="${build.home}/conf/MANIFEST.MF"/>
73-
</target>
74-
<target name="install-jar" depends="jar" description="--> Installs jar file in ${lib.repo}">
75-
<copy todir="${lib.repo}" filtering="no">
76-
<fileset dir="${dist.home}">
77-
<include name="${final.name}.jar"/>
78-
</fileset>
79-
</copy>
80-
</target>
81-
<!-- ========== Unit Test Targets ========================================= -->
82-
<target name="compile.tests" depends="compile" description="Compile unit test cases">
83-
<javac srcdir="${test.home}" destdir="${build.home}/tests" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
84-
<classpath refid="test.classpath"/>
85-
</javac>
86-
<copy todir="${build.home}/tests" filtering="on">
87-
<fileset dir="${test.home}" excludes="**/*.java"/>
88-
</copy>
89-
</target>
90-
<!-- Run all the JUnit Tests -->
91-
<target name="test" depends="compile.tests" description="Compiles and runs unit test cases">
92-
<record name="${build.home}/test-output.txt" append="no" action="start"/>
93-
<junit printsummary="yes" haltonfailure="yes">
94-
<classpath refid="test.classpath"/>
95-
<formatter type="plain"/>
96-
<batchtest fork="yes" todir="${build.home}/test-reports">
97-
<fileset dir="${test.home}">
98-
<include name="**/*Test.java"/>
99-
<exclude name="**/*AbstractTest.java"/>
100-
</fileset>
101-
</batchtest>
102-
</junit>
103-
<record name="${build.home}/test-output.txt" action="stop"/>
104-
</target>
105-
</project>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
build.xml generated by maven from project.xml version 1.1.1-dev
5+
on date June 10 2003, time 2242
6+
-->
7+
8+
<project default="jar" name="commons-codec" basedir=".">
9+
<property name="defaulttargetdir" value="target">
10+
</property>
11+
<property name="libdir" value="target/lib">
12+
</property>
13+
<property name="classesdir" value="target/classes">
14+
</property>
15+
<property name="testclassesdir" value="target/test-classes">
16+
</property>
17+
<property name="testreportdir" value="target/test-reports">
18+
</property>
19+
<property name="distdir" value="dist">
20+
</property>
21+
<property name="javadocdir" value="dist/docs/api">
22+
</property>
23+
<property name="final.name" value="commons-codec-1.1.1-dev">
24+
</property>
25+
<target name="init" description="o Initializes some properties">
26+
<mkdir dir="${libdir}">
27+
</mkdir>
28+
<condition property="noget">
29+
<equals arg2="only" arg1="${build.sysclasspath}">
30+
</equals>
31+
</condition>
32+
</target>
33+
<target name="compile" description="o Compile the code" depends="get-deps">
34+
<mkdir dir="${classesdir}">
35+
</mkdir>
36+
<javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
37+
<src>
38+
<pathelement location="src/java">
39+
</pathelement>
40+
</src>
41+
<classpath>
42+
<fileset dir="${libdir}">
43+
<include name="*.jar">
44+
</include>
45+
</fileset>
46+
</classpath>
47+
</javac>
48+
<copy todir="${testclassesdir}">
49+
<fileset dir="src/test">
50+
<include name="**/*.xml">
51+
</include>
52+
</fileset>
53+
</copy>
54+
</target>
55+
<target name="jar" description="o Create the jar" depends="compile,test">
56+
<jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
57+
</jar>
58+
</target>
59+
<target name="clean" description="o Clean up the generated directories">
60+
<delete dir="${defaulttargetdir}">
61+
</delete>
62+
<delete dir="${distdir}">
63+
</delete>
64+
</target>
65+
<target name="dist" description="o Create a distribution" depends="jar, javadoc">
66+
<mkdir dir="dist">
67+
</mkdir>
68+
<copy todir="dist">
69+
<fileset dir="${defaulttargetdir}" includes="*.jar">
70+
</fileset>
71+
<fileset dir="${basedir}" includes="LICENSE*, README*">
72+
</fileset>
73+
</copy>
74+
</target>
75+
<target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
76+
<fail message="There were test failures.">
77+
</fail>
78+
</target>
79+
<target name="internal-test" depends="compile-tests">
80+
<mkdir dir="${testreportdir}">
81+
</mkdir>
82+
<junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
83+
<sysproperty key="basedir" value=".">
84+
</sysproperty>
85+
<formatter type="xml">
86+
</formatter>
87+
<formatter usefile="false" type="plain">
88+
</formatter>
89+
<classpath>
90+
<fileset dir="${libdir}">
91+
<include name="*.jar">
92+
</include>
93+
</fileset>
94+
<pathelement path="${testclassesdir}">
95+
</pathelement>
96+
<pathelement path="${classesdir}">
97+
</pathelement>
98+
</classpath>
99+
<batchtest todir="${testreportdir}">
100+
<fileset dir="src/test">
101+
<include name="**/*Test.java">
102+
</include>
103+
<exclude name="**/*AbstractTest.java">
104+
</exclude>
105+
</fileset>
106+
</batchtest>
107+
</junit>
108+
</target>
109+
<target name="compile-tests" depends="compile">
110+
<mkdir dir="${testclassesdir}">
111+
</mkdir>
112+
<javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
113+
<src>
114+
<pathelement location="src/test">
115+
</pathelement>
116+
</src>
117+
<classpath>
118+
<fileset dir="${libdir}">
119+
<include name="*.jar">
120+
</include>
121+
</fileset>
122+
<pathelement path="${classesdir}">
123+
</pathelement>
124+
</classpath>
125+
</javac>
126+
</target>
127+
<target name="javadoc" description="o Generate javadoc" depends="jar">
128+
<mkdir dir="${javadocdir}">
129+
</mkdir>
130+
<tstamp>
131+
<format pattern="2002-yyyy" property="year">
132+
</format>
133+
</tstamp>
134+
<property name="copyright" value="Copyright &amp;copy; Apache Software Foundation. All Rights Reserved.">
135+
</property>
136+
<property name="title" value="Codec 1.1.1-dev API">
137+
</property>
138+
<javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.commons.*.*">
139+
<classpath>
140+
<fileset dir="${libdir}">
141+
<include name="*.jar">
142+
</include>
143+
</fileset>
144+
<pathelement location="target/${final.name}.jar">
145+
</pathelement>
146+
</classpath>
147+
</javadoc>
148+
</target>
149+
<target name="get-deps" unless="noget" depends="init">
150+
<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">
151+
</get>
152+
<get dest="${libdir}/ant-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar">
153+
</get>
154+
<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">
155+
</get>
156+
</target>
157+
<target name="install-maven">
158+
<get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">
159+
</get>
160+
<unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
161+
</unjar>
162+
</target>
163+
</project>

0 commit comments

Comments
 (0)