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 <echo message="basedir: ${basedir}" /> 17 18 19 <!--<property name="path_to_policy" value="file:./integration/src/policy/java-under-ant.policy"/>--> 20 21 <path id="path150Binding"> 22 <pathelement location="target/test-classes/" /> 23 <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> 24 <pathelement location="./lib/slf4j-simple-1.5.0.jar" /> 25 </path > 26 27 <path id="path1511API"> 28 <pathelement location="target/test-classes/" /> 29 <pathelement location="./lib/slf4j-api-1.5.11.jar" /> 30 <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> 31 </path > 32 33 <path id="path1511Binding"> 34 <pathelement location="target/test-classes/" /> 35 <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> 36 <pathelement location="./lib/slf4j-simple-1.5.11.jar" /> 37 </path > 38 39 <path id="pathCurrent"> 40 <pathelement location="target/test-classes/" /> 41 <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> 42 <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> 43 </path > 44 45 <path id="multiBinding"> 46 <pathelement location="target/test-classes/" /> 47 <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> 48 <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> 49 <pathelement location="../slf4j-nop/target/slf4j-nop-${currentVersion}.jar" /> 50 </path > 51 52 <path id="binding166"> 53 <pathelement location="target/test-classes/" /> 54 <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> 55 <pathelement location="./lib/slf4j-simple-1.6.6.jar" /> 56 </path > 57 58 <path id="binding2099"> 59 <pathelement location="target/test-classes/" /> 60 <pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" /> 61 <pathelement location="./lib/slf4j-simple-2.0.99.jar" /> 62 </path > 63 64 65 <path id="api166"> 66 <pathelement location="target/test-classes/" /> 67 <pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" /> 68 <pathelement location="./lib/slf4j-api-1.6.6.jar" /> 69 </path > 70 71 72 <!-- this is really very ugly, but it's the only way to circumvent 73 http://jira.codehaus.org/browse/MANTRUN-95 74 --> 75 <!-- 76 <taskdef name="junit" classpath="${plugin_classpath};${compile_classpath}" 77 classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" /> 78 --> 79 80 <target name="init"> 81 <mkdir dir="target/unit-reports" /> 82 </target> 83 84 <target name="testAll" depends="init, 85 testNoProvider150, 86 testMismatch, 87 testMatch, 88 testMultiBinding, 89 testFuture_16Series, 90 testActiveSecurityManager"> 91 </target> 92 93 94 <target name="testNoProvider150"> 95 96 <junit printsummary="yes" fork="no" haltonfailure="yes"> 97 <classpath refid="path150Binding" /> 98 <formatter type="plain" /> 99 <test fork="yes" todir="target/unit-reports" 100 outfile="TEST-150BINDING" 101 name="org.slf4j.NoProviderAssertionTest" /> 102 </junit> 103 104 </target> 105 106 107 <target name="testMixed17"> 108 109 <junit printsummary="yes" fork="no" haltonfailure="yes"> 110 <classpath refid="pathMixed17" /> 111 <formatter type="plain" /> 112 <test fork="yes" todir="target/unit-reports" 113 outfile="TEST-MIXED-17" 114 name="org.slf4j.VersionMismatchAssertionTest" /> 115 </junit> 116 </target> 117 118 119 <target name="testMismatch"> 120 121 <!-- 122 123 <junit printsummary="yes" fork="no" haltonfailure="yes"> 124 <classpath refid="path1511API" /> 125 <formatter type="plain" /> 126 <test fork="yes" todir="target/unit-reports" 127 outfile="TEST-MISMATCH-1511API" 128 name="org.slf4j.OldAPIVersionMismatchAssertionTest" /> 129 </junit> 130 --> 131 132 <!-- 133 <junit printsummary="yes" fork="no" haltonfailure="yes"> 134 <classpath refid="path1511Binding" /> 135 <formatter type="plain" /> 136 <test fork="yes" todir="target/unit-reports" 137 outfile="TEST-MISMATCH-1511Binding" 138 name="org.slf4j.VersionMismatchAssertionTest" /> 139 </junit> 140 --> 141 142 </target> 143 144 <target name="testMatch"> 145 <junit printsummary="yes" fork="no" haltonfailure="yes"> 146 <classpath refid="pathCurrent" /> 147 <formatter type="plain" /> 148 <test fork="yes" todir="target/unit-reports" 149 outfile="TEST-Match" 150 name="org.slf4j.CompatibilityAssertionTest" /> 151 </junit> 152 153 </target> 154 155 <target name="testMultiBinding"> 156 <junit printsummary="yes" fork="no" haltonfailure="yes"> 157 <classpath refid="multiBinding" /> 158 <formatter type="plain" /> 159 <test fork="yes" todir="target/unit-reports" 160 outfile="TEST-MultiBinding" 161 name="org.slf4j.MultiBindingAssertionTest" /> 162 </junit> 163 </target> 164 165 166 <target name="testFuture_16Series"> 167 168 <!-- 1.8 uses providers and no longer supports bindings == 169 170 <junit printsummary="yes" fork="no" haltonfailure="yes"> 171 <classpath refid="binding166" /> 172 <formatter type="plain" /> 173 <test fork="yes" todir="target/unit-reports" 174 outfile="TEST-binding166" 175 name="org.slf4j.NoProviderAssertionTest" /> 176 </junit> 177 178 179 <junit printsummary="yes" fork="no" haltonfailure="yes"> 180 <classpath refid="api166" /> 181 <formatter type="plain" /> 182 <test fork="yes" todir="target/unit-reports" 183 outfile="TEST-api166" 184 name="org.slf4j.CompatibilityAssertionTest" /> 185 </junit> 186 --> 187 </target> 188 189 190 <condition property="runFromWithinIntegrationModule"> 191 <contains string="${user.dir}" substring="integration" /> 192 </condition> 193 194 <target name="setPathToPolicy_FromTop" unless="runFromWithinIntegrationModule"> 195 <echo>setPathToPolicy_FromTop</echo> 196 <property name="path_to_policy" value="file:./integration/src/policy/java-under-ant.policy"/> 197 </target> 198 199 <target name="setPathToPolicy_FromIntegration" if="runFromWithinIntegrationModule"> 200 <echo>setPathToPolicy_FromInegration </echo> 201 <property name="path_to_policy" value="file:./src/policy/java-under-ant.policy"/> 202 </target> 203 204 205 <target name="testActiveSecurityManager" depends="setPathToPolicy_FromTop, setPathToPolicy_FromIntegration"> 206 <junit printsummary="yes" fork="no" haltonfailure="yes"> 207 <jvmarg value="-Djava.security.manager"/> 208 <jvmarg value="-Djava.security.policy=${path_to_policy}"/> 209 <jvmarg value="-Dslf4j.detectLoggerNameMismatch=true"/> 210 <classpath refid="pathCurrent" /> 211 <formatter type="plain" /> 212 <test fork="yes" todir="target/unit-reports" 213 outfile="TEST-SecurityManager" 214 name="org.slf4j.issues.Issue324Test" /> 215 </junit> 216 </target> 217 218</project>