Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 214 lines (178 sloc) 8.528 kB
f0e7eec @sgroschupf BIXO-3,adding MIT license headers and checkstyle to verify java file …
sgroschupf authored
1 <!--
2 Copyright (c) 1997-2009 101tec Inc.
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 SOFTWARE.
21 -->
0d2da4b @sgroschupf BIXO-1, ivy based build and simple project skeleton.
sgroschupf authored
22 <project name="bixo-core" default="test" xmlns:ivy="antlib:org.apache.ivy.ant">
23
24 <property name="root.dir" value="${basedir}" />
25 <!-- all standard ant tasks are in the common build file-->
26 <import file="${root.dir}/src/build/ant/common-build.xml" />
27
28
29
30 <!-- ================================================================== -->
31 <!-- Integration Tests -->
32 <!-- ================================================================== -->
33
34 <target name="compile-integration-test" depends="compile, compile-test" >
35 <echo>*** Building Integration Tests Sources ***</echo>
36 <mkdir dir="${build.dir.it-classes}" />
37 <ivy:cachepath pathid="test.path.id" conf="test" />
38 <path id="test.path">
39 <path refid="test.path.id" />
40 <pathelement location="${build.dir.main-classes}" />
41 <pathelement location="${build.dir.test-classes}" />
42 </path>
43
44 <javac encoding="${build.encoding}" srcdir="${it.src.dir}" includes="**/*.java" destdir="${build.dir.it-classes}" debug="${javac.debug}" optimize="${javac.optimize}" target="${javac.version}" source="${javac.version}" deprecation="${javac.deprecation}">
45 <compilerarg line="${javac.args} ${javac.args.warnings}" />
46 <classpath refid="test.path" />
47 </javac>
48 </target>
49
50 <target name="it" depends="jar, compile-integration-test" description="--> run integration tests">
51 <delete dir="${build.dir.it-reports}" />
52 <mkdir dir="${build.dir.it-reports}" />
53
54 <delete dir="${build.dir.test-data}" />
55 <mkdir dir="${build.dir.test-data}" />
56
57 <ivy:cachepath pathid="test.path.id" conf="test" />
58
59 <junit showoutput="no" printsummary="yes" haltonfailure="no" fork="yes" maxmemory="256m" dir="${basedir}" errorProperty="tests.failed" failureProperty="tests.failed">
60 <classpath>
61 <pathelement location="${build.dir.main-classes}" />
62 <pathelement location="${build.dir.it-classes}" />
63 <pathelement location="${build.dir.test-classes}" />
64 <pathelement location="${test.res.dir}" />
65 <path refid="test.path.id" />
66 <fileset file="${build.dir}/${ant.project.name}.jar" />
67 </classpath>
68 <formatter type="plain" />
69
70 <batchtest fork="yes" todir="${build.dir.it-reports}">
71 <fileset dir="${it.src.dir}">
72 <include name="**/*Test*.java" unless="testcase" />
73 </fileset>
74 </batchtest>
75 </junit>
76 <fail if="tests.failed">Tests failed!</fail>
77 </target>
78
79 <!-- ================================================================== -->
80 <!-- Generate a distribution -->
81 <!-- ================================================================== -->
82
83 <target name="dist" depends="test, it, coverage, jar, doc" description="--> creates a distribution">
84
85 <delete dir="${build.dir.dist}" />
86 <!-- creating a fileset for pulling all libs from ivycache cuz disk space is cheap -->
87 <ivy:cachefileset conf="compile" setid="libs" />
88
89 <!-- create target directory -->
90 <mkdir dir="${build.dir.dist}" />
91 <mkdir dir="${build.dir.dist}/bin" />
92 <mkdir dir="${build.dir.dist}/conf" />
93 <mkdir dir="${build.dir.dist}/docs" />
94 <mkdir dir="${build.dir.dist}/docs/javadoc" />
95 <mkdir dir="${build.dir.dist}/docs/reports" />
96 <mkdir dir="${build.dir.dist}/lib" />
97 <mkdir dir="${build.dir.dist}/src" />
98
99 <!-- copy launch script to target -->
100 <copy todir="${build.dir.dist}/bin">
101 <fileset dir="${basedir}/bin" />
102 </copy>
103 <!-- copy conf to target dir -->
104 <copy todir="${build.dir.dist}/conf">
105 <fileset dir="${basedir}/conf" />
106 </copy>
107 <!-- copy javadoc to target dir -->
108 <copy todir="${build.dir.dist}/docs/javadoc">
109 <fileset dir="${build.javadoc}" />
110 </copy>
111 <!-- copy reports to target dir -->
112 <copy todir="${build.dir.dist}/docs/reports" failonerror="no">
113 <fileset dir="${coverage.html.dir}" />
114 </copy>
115 <!-- copy ivy cache to lib -->
116 <copy todir="${build.dir.dist}/lib" flatten="true">
117 <fileset refid="libs" />
118 </copy>
119 <!-- copy src -->
120 <copy todir="${build.dir.dist}/src">
121 <fileset dir="${basedir}/src" />
122 </copy>
123 <!-- copy project jar to dist dir -->
124 <copy todir="${build.dir.dist}">
125 <fileset file="${build.dir}/${jar.name}" />
126 </copy>
127
128 <!-- copy project jar to dist dir -->
129 <copy todir="${build.dir.dist}">
130 <fileset file="${basedir}/CHANGES.txt" />
131 <fileset file="${basedir}/LICENSE.txt" />
132 <fileset file="${basedir}/README.txt" />
133 </copy>
134
135 <tar longfile="gnu" compression="gzip" destfile="${build.release.file}">
136 <tarfileset dir="${build.dir.dist}" />
137 </tar>
138 </target>
139
140 <!-- ================================================================== -->
141 <!-- Generating eclipse file -->
142 <!-- ================================================================== -->
143
144 <target name="eclipse" depends="resolve">
145
146 <ivy:cachepath pathid="eclipse.path.id" conf="eclipse" />
147 <ivy:cachepath pathid="test.path.id" conf="test" />
148 <taskdef name="eclipse" classname="prantl.ant.eclipse.EclipseTask" classpathref="eclipse.path.id" />
149 <mkdir dir="${build.dir.main-classes}" />
150 <mkdir dir="${build.dir.test-classes}" />
151 <eclipse>
152 <settings>
153 <jdtcore compilercompliance="6.0" />
154 <resources encoding="UTF-8" />
155 </settings>
156 <project name="${ant.project.name}" />
157 <classpath>
158 <container path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" />
159
3bbc81e @sgroschupf implementing the basic fetcher.
sgroschupf authored
160 <source path="${basedir}/conf" output="${build.dir.main-classes}" />
0d2da4b @sgroschupf BIXO-1, ivy based build and simple project skeleton.
sgroschupf authored
161 <source path="${basedir}/src/main/java" output="${build.dir.main-classes}" />
162 <source path="${basedir}/src/test/java" output="${build.dir.test-classes}" />
163 <source path="${basedir}/src/test/resources" output="${build.dir.test-classes}" />
164 <source path="${basedir}/src/test/integration" output="${build.dir.test-classes}" />
165
166
167 <!-- extras -->
168 <!-- we do not yet have extra modules, but it is just a question of time :) -->
169
170 <output path="${build.dir.main-classes}" />
171 <library pathref="test.path.id" exported="false" />
172 </classpath>
173 </eclipse>
174 <concat destfile="${basedir.ivy.instance}/.settings/org.eclipse.jdt.core.prefs" append="true">
175 <filelist dir="${root.dir}/src/build/eclipse" files="formatter"/>
176 </concat>
177 <replace file="${basedir.ivy.instance}/.settings/org.eclipse.jdt.core.prefs" token="org.eclipse.jdt.core.compiler.compliance=6.0" value="org.eclipse.jdt.core.compiler.compliance=1.6" />
178 </target>
179
180 <target name="clean-eclipse" depends="resolve" description="--> cleans the eclipse project files">
181 <delete file=".classpath" />
182 <delete file=".eclipse" />
183 <delete file=".project" />
184 <delete dir=".settings" />
185 </target>
186
187
188 <!-- ================================================================== -->
189 <!-- Multi project build -->
190 <!-- ================================================================== -->
191
192 <macrodef name="iterate">
193 <attribute name="target" />
194 <sequential>
195 <subant target="@{target}">
196 <property name="root.dir" value="${basedir}" />
197 <!-- extras should go into a sub folder extras
198 <fileset dir="extras" includes="*/build.xml" />
199 -->
200 </subant>
201 </sequential>
202 </macrodef>
203
204 <target name="clean-all">
205 <antcall target="clean" />
206 <iterate target="clean" />
207 </target>
208
209 <target name="test-all">
210 <iterate target="test" />
211 </target>
5744d35 Cloned default Cascading-based build (really)
Ken Krugler authored
212
213 </project>
Something went wrong with that request. Please try again.