~ubuntu-branches/ubuntu/precise/commons-csv/precise

« back to all changes in this revision

Viewing changes to build.xml

  • Committer: Bazaar Package Importer
  • Author(s): Jan-Pascal van Best
  • Date: 2008-09-10 20:58:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080910205800-ohoq6075nafu8n2b
Tags: upstream-0.1-SNAPSHOT+svn678580
ImportĀ upstreamĀ versionĀ 0.1-SNAPSHOT+svn678580

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
 
3
 
<!--build.xml generated by maven from project.xml version 0.1-SNAPSHOT
4
 
  on date September 18 2006, time 2225-->
5
 
 
6
 
<project default="jar" name="commons-csv" basedir=".">
7
 
  <property name="defaulttargetdir" value="target">
8
 
  </property>
9
 
  <property name="libdir" value="target/lib">
10
 
  </property>
11
 
  <property name="classesdir" value="target/classes">
12
 
  </property>
13
 
  <property name="testclassesdir" value="target/test-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-csv-0.1-SNAPSHOT">
24
 
  </property>
25
 
  <path id="build.classpath">
26
 
    <fileset dir="${libdir}">
27
 
      <include name="**/*.jar">
28
 
      </include>
29
 
    </fileset>
30
 
  </path>
31
 
  <target name="init" description="o Initializes some properties">
32
 
    <mkdir dir="${libdir}">
33
 
    </mkdir>
34
 
    <condition property="noget">
35
 
      <equals arg2="only" arg1="${build.sysclasspath}">
36
 
      </equals>
37
 
    </condition>
38
 
    <!--Test if JUNIT is present in ANT classpath-->
39
 
 
40
 
    <available property="Junit.present" classname="junit.framework.Test">
41
 
    </available>
42
 
  </target>
43
 
  <target name="compile" description="o Compile the code" depends="get-deps">
44
 
    <mkdir dir="${classesdir}">
45
 
    </mkdir>
46
 
    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
47
 
      <src>
48
 
        <pathelement location="src/java">
49
 
        </pathelement>
50
 
      </src>
51
 
      <classpath refid="build.classpath">
52
 
      </classpath>
53
 
    </javac>
54
 
    <mkdir dir="${classesdir}/META-INF">
55
 
    </mkdir>
56
 
    <copy todir="${classesdir}/META-INF">
57
 
      <fileset dir=".">
58
 
        <include name="NOTICE.txt">
59
 
        </include>
60
 
      </fileset>
61
 
    </copy>
62
 
  </target>
63
 
  <target name="jar" description="o Create the jar" depends="compile,test">
64
 
    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
65
 
    </jar>
66
 
  </target>
67
 
  <target name="clean" description="o Clean up the generated directories">
68
 
    <delete dir="${defaulttargetdir}">
69
 
    </delete>
70
 
    <delete dir="${distdir}">
71
 
    </delete>
72
 
  </target>
73
 
  <target name="dist" description="o Create a distribution" depends="jar, javadoc">
74
 
    <mkdir dir="dist">
75
 
    </mkdir>
76
 
    <copy todir="dist">
77
 
      <fileset dir="${defaulttargetdir}" includes="*.jar">
78
 
      </fileset>
79
 
      <fileset dir="${basedir}" includes="LICENSE*, README*">
80
 
      </fileset>
81
 
    </copy>
82
 
  </target>
83
 
  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
84
 
    <fail message="There were test failures.">
85
 
    </fail>
86
 
  </target>
87
 
  <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
88
 
    <mkdir dir="${testreportdir}">
89
 
    </mkdir>
90
 
    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
91
 
      <sysproperty key="basedir" value=".">
92
 
      </sysproperty>
93
 
      <formatter type="xml">
94
 
      </formatter>
95
 
      <formatter usefile="false" type="plain">
96
 
      </formatter>
97
 
      <classpath>
98
 
        <path refid="build.classpath">
99
 
        </path>
100
 
        <pathelement path="${testclassesdir}">
101
 
        </pathelement>
102
 
        <pathelement path="${classesdir}">
103
 
        </pathelement>
104
 
      </classpath>
105
 
      <batchtest todir="${testreportdir}">
106
 
        <fileset dir="src/test">
107
 
          <include name="**/*Test.java">
108
 
          </include>
109
 
        </fileset>
110
 
      </batchtest>
111
 
    </junit>
112
 
  </target>
113
 
  <target name="junit-present" unless="Junit.present" depends="init">
114
 
    <echo>================================= WARNING ================================</echo>
115
 
    <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
116
 
    <echo>==========================================================================</echo>
117
 
  </target>
118
 
  <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
119
 
    <mkdir dir="${testclassesdir}">
120
 
    </mkdir>
121
 
    <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
122
 
      <src>
123
 
        <pathelement location="src/test">
124
 
        </pathelement>
125
 
      </src>
126
 
      <classpath>
127
 
        <path refid="build.classpath">
128
 
        </path>
129
 
        <pathelement path="${classesdir}">
130
 
        </pathelement>
131
 
      </classpath>
132
 
    </javac>
133
 
  </target>
134
 
  <target name="javadoc" description="o Generate javadoc" depends="get-deps">
135
 
    <mkdir dir="${javadocdir}">
136
 
    </mkdir>
137
 
    <tstamp>
138
 
      <format pattern="2005-yyyy" property="year">
139
 
      </format>
140
 
    </tstamp>
141
 
    <property name="copyright" value="Copyright &amp;copy;  The Apache Software Foundation. All Rights Reserved.">
142
 
    </property>
143
 
    <property name="title" value="Commons CSV 0.1-SNAPSHOT API">
144
 
    </property>
145
 
    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.commons.csv.*">
146
 
      <classpath>
147
 
        <path refid="build.classpath">
148
 
        </path>
149
 
      </classpath>
150
 
    </javadoc>
151
 
  </target>
152
 
  <target name="get-deps" unless="noget" depends="init">
153
 
    <!--Proxy settings works only with a JDK 1.2 and higher.-->
154
 
 
155
 
    <setproxy>
156
 
    </setproxy>
157
 
    <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">
158
 
    </get>
159
 
    <get dest="${libdir}/maven-xdoc-plugin-1.9.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/maven/plugins/maven-xdoc-plugin-1.9.2.jar">
160
 
    </get>
161
 
  </target>
162
 
  <target name="install-maven">
163
 
    <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">
164
 
    </get>
165
 
    <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
166
 
    </unjar>
167
 
  </target>
168
 
</project>
 
 
b'\\ No newline at end of file'