1<project name="integration" default="testAll" basedir=".">
2
3	<!--
4		This build file is usually run indirectly via Maven.
5
6		When running this build file through Ant directly, you must
7		define the currentVersion property on the command line, e.g.:
8
9		ant  -DcurrentVersion=1.5.4-SNAPSHOT
10	-->
11
12	<echo message="compile classpath: ${compile_classpath}" />
13	<echo message="runtime classpath: ${runtime_classpath}" />
14	<echo message="test classpath:    ${test_classpath}" />
15	<echo message="plugin classpath:  ${plugin_classpath}" />
16
17
18	<path id="path142Binding">
19		<pathelement location="target/test-classes/" />
20		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
21		<pathelement location="./lib/slf4j-simple-1.4.2.jar" />
22	</path >
23
24	<path id="path150Binding">
25		<pathelement location="target/test-classes/" />
26		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
27		<pathelement location="./lib/slf4j-simple-1.5.0.jar" />
28	</path >
29
30	<path id="path1511API">
31		<pathelement location="target/test-classes/" />
32		<pathelement location="./lib/slf4j-api-1.5.11.jar" />
33		<pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" />
34	</path >
35
36	<path id="path1511Binding">
37		<pathelement location="target/test-classes/" />
38		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
39		<pathelement location="./lib/slf4j-simple-1.5.11.jar" />
40	</path >
41
42  <!--<path id="pathIncompatible">
43		<pathelement location="target/test-classes/" />
44		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
45		<pathelement location="./lib/slf4j-simple-INCOMPATIBLE.jar" />
46	</path >
47  -->
48
49	<path id="pathCurrent">
50		<pathelement location="target/test-classes/" />
51		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
52		<pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" />
53	</path >
54
55
56	<path id="incompatibleMultiBinding">
57		<pathelement location="target/test-classes/" />
58		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
59		<pathelement location="./lib/slf4j-simple-1.5.0.jar" />
60		<pathelement location="./lib/slf4j-nop-1.5.6.jar" />
61	</path >
62
63  <path id="multiBinding">
64 		<pathelement location="target/test-classes/" />
65 		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
66    <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" />
67    <pathelement location="../slf4j-nop/target/slf4j-nop-${currentVersion}.jar" />
68 	</path >
69
70  <path id="binding166">
71		<pathelement location="target/test-classes/" />
72		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
73		<pathelement location="./lib/slf4j-simple-1.6.6.jar" />
74	</path >
75
76  <path id="binding2099">
77		<pathelement location="target/test-classes/" />
78		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
79		<pathelement location="./lib/slf4j-simple-2.0.99.jar" />
80	</path >
81
82
83  <path id="api166">
84		<pathelement location="target/test-classes/" />
85		<pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" />
86		<pathelement location="./lib/slf4j-api-1.6.6.jar" />
87	</path >
88
89
90	<!-- this is really very ugly, but it's the only way to circumvent
91  	     http://jira.codehaus.org/browse/MANTRUN-95
92	-->
93	<taskdef name="junit" classpath="${plugin_classpath};${compile_classpath}"
94           classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" />
95
96	<target name="init">
97		<mkdir dir="target/unit-reports" />
98	</target>
99
100	<target name="testAll" depends="init,
101		            testMissingSingletonMethod,
102                testMismatch,
103                testMatch,
104		            testMultiBinding,
105		            testIncompatibleMultiBinding,
106                testFuture_16Series">
107	</target>
108
109
110	<target name="testMissingSingletonMethod">
111
112    <junit printsummary="yes" fork="no" haltonfailure="yes">
113			<classpath refid="path142Binding" />
114			<formatter type="plain" />
115			<test fork="yes" todir="target/unit-reports"
116            outfile="TEST-142BININDING"
117            name="org.slf4j.MissingSingletonMethodAssertionTest" />
118		</junit>
119
120    <junit printsummary="yes" fork="no" haltonfailure="yes">
121			<classpath refid="path150Binding" />
122			<formatter type="plain" />
123			<test fork="yes" todir="target/unit-reports"
124            outfile="TEST-150BINDING"
125            name="org.slf4j.MissingSingletonMethodAssertionTest" />
126		</junit>
127
128  </target>
129
130	<target name="testMismatch">
131
132    <junit printsummary="yes" fork="no" haltonfailure="yes">
133			<classpath refid="path1511API" />
134			<formatter type="plain" />
135			<test fork="yes" todir="target/unit-reports"
136            outfile="TEST-MISMATCH-1511API"
137            name="org.slf4j.VersionMismatchAssertionTest" />
138		</junit>
139
140
141    <junit printsummary="yes" fork="no" haltonfailure="yes">
142			<classpath refid="path1511Binding" />
143			<formatter type="plain" />
144			<test fork="yes" todir="target/unit-reports"
145            outfile="TEST-MISMATCH-1511Binding"
146            name="org.slf4j.VersionMismatchAssertionTest" />
147		</junit>
148
149	</target>
150
151	<target name="testMatch">
152		<junit printsummary="yes" fork="no" haltonfailure="yes">
153			<classpath refid="pathCurrent" />
154			<formatter type="plain" />
155			<test fork="yes" todir="target/unit-reports"
156            outfile="TEST-Match"
157            name="org.slf4j.CompatibilityAssertionTest" />
158		</junit>
159	</target>
160
161	<target name="testIncompatibleMultiBinding">
162		<junit printsummary="yes" fork="no" haltonfailure="yes">
163			<classpath refid="incompatibleMultiBinding" />
164			<formatter type="plain" />
165			<test fork="yes" todir="target/unit-reports"
166            outfile="TEST-IncompatibleMultiBinding"
167            name="org.slf4j.IncompatibleMultiBindingAssertionTest" />
168		</junit>
169	</target>
170
171  <target name="testMultiBinding">
172 		<junit printsummary="yes" fork="no" haltonfailure="yes">
173 			<classpath refid="multiBinding" />
174 			<formatter type="plain" />
175 			<test fork="yes" todir="target/unit-reports"
176             outfile="TEST-MultiBinding"
177             name="org.slf4j.MultiBindingAssertionTest" />
178 		</junit>
179 	</target>
180
181	<target name="testFuture_16Series">
182		<junit printsummary="yes" fork="no" haltonfailure="yes">
183			<classpath refid="binding166" />
184			<formatter type="plain" />
185			<test fork="yes" todir="target/unit-reports"
186            outfile="TEST-binding166"
187            name="org.slf4j.CompatibilityAssertionTest" />
188		</junit>
189
190
191    <junit printsummary="yes" fork="no" haltonfailure="yes">
192      <classpath refid="api166" />
193      <formatter type="plain" />
194      <test fork="yes" todir="target/unit-reports"
195            outfile="TEST-api166"
196            name="org.slf4j.CompatibilityAssertionTest" />
197		</junit>
198
199	</target>
200</project>