|
|
|
@ -2,12 +2,12 @@
|
|
|
|
|
<property name="src.dir" location="src/test/groovy" />
|
|
|
|
|
<property name="resource.dir" location="src/test/resources" />
|
|
|
|
|
<property name="build.dir" location="ant/build" />
|
|
|
|
|
<property name="lib.dir" location="ant/lib" />
|
|
|
|
|
|
|
|
|
|
<property name="lib.dir" location="ant/lib" />
|
|
|
|
|
|
|
|
|
|
<property name="maven.ant.tasks.url" value="http://central.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar" />
|
|
|
|
|
<property name="maven.ant.tasks.jar" value="${lib.dir}${file.separator}maven-ant-tasks-2.1.3.jar" />
|
|
|
|
|
<available property="maven.ant.tasks.jar.exists" file="${maven.ant.tasks.jar}" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="bootstrap.maven.tasks" unless="maven.ant.tasks.jar.exists">
|
|
|
|
|
<mkdir dir="${lib.dir}" />
|
|
|
|
|
<get
|
|
|
|
@ -16,30 +16,30 @@
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="init.maven.tasks" depends="bootstrap.maven.tasks">
|
|
|
|
|
<typedef
|
|
|
|
|
resource="org/apache/maven/artifact/ant/antlib.xml"
|
|
|
|
|
uri="urn:maven-artifact-ant"
|
|
|
|
|
classpath="${maven.ant.tasks.jar}" />
|
|
|
|
|
<typedef
|
|
|
|
|
resource="org/apache/maven/artifact/ant/antlib.xml"
|
|
|
|
|
uri="urn:maven-artifact-ant"
|
|
|
|
|
classpath="${maven.ant.tasks.jar}" />
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="resolve.dependencies" depends="init.maven.tasks">
|
|
|
|
|
|
|
|
|
|
<target name="resolve.dependencies" depends="init.maven.tasks">
|
|
|
|
|
<artifact:dependencies pathId="classpath.spock">
|
|
|
|
|
<!-- Mandatory dependencies for using Spock -->
|
|
|
|
|
<dependency
|
|
|
|
|
groupId="org.spockframework"
|
|
|
|
|
artifactId="spock-core"
|
|
|
|
|
version="1.0-groovy-2.4" />
|
|
|
|
|
version="1.1-groovy-2.4-rc-3" />
|
|
|
|
|
<!-- Optional dependencies for using Spock -->
|
|
|
|
|
<!-- enables mocking of classes (in addition to interfaces) -->
|
|
|
|
|
<dependency
|
|
|
|
|
<dependency
|
|
|
|
|
groupId="cglib"
|
|
|
|
|
artifactId="cglib-nodep"
|
|
|
|
|
version="3.1" />
|
|
|
|
|
version="3.2.4" />
|
|
|
|
|
<!-- enables mocking of classes without parameterless constructor (together with CGLIB) -->
|
|
|
|
|
<dependency
|
|
|
|
|
groupId="org.objenesis"
|
|
|
|
|
artifactId="objenesis"
|
|
|
|
|
version="2.1" />
|
|
|
|
|
version="2.5.1" />
|
|
|
|
|
<!-- only required if Spock's Ant selector is used, which finds spec classes regardless of their name -->
|
|
|
|
|
<dependency
|
|
|
|
|
groupId="org.ow2.asm"
|
|
|
|
@ -64,19 +64,19 @@
|
|
|
|
|
url="https://oss.sonatype.org/content/repositories/snapshots/" />
|
|
|
|
|
</artifact:dependencies>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="init.groovy.tasks" depends="resolve.dependencies">
|
|
|
|
|
<!-- Using the Groovy compiler from classpath.spock is a simple and safe setup -->
|
|
|
|
|
<taskdef
|
|
|
|
|
name="groovyc"
|
|
|
|
|
classname="org.codehaus.groovy.ant.Groovyc"
|
|
|
|
|
classpathref="classpath.spock" />
|
|
|
|
|
classpathref="classpath.spock" />
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="init" depends="init.groovy.tasks">
|
|
|
|
|
<tstamp />
|
|
|
|
|
<mkdir dir="${build.dir}" />
|
|
|
|
|
</target>
|
|
|
|
|
<mkdir dir="${build.dir}" />
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="copy.resources" depends="init">
|
|
|
|
|
<copy todir="${build.dir}">
|
|
|
|
@ -90,11 +90,11 @@
|
|
|
|
|
destdir="${build.dir}"
|
|
|
|
|
classpathref="classpath.spock" />
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="test" depends="compile">
|
|
|
|
|
<junit fork="true" forkmode="once">
|
|
|
|
|
<classpath path="${build.dir}" />
|
|
|
|
|
<classpath refid="classpath.spock" />
|
|
|
|
|
<classpath refid="classpath.spock" />
|
|
|
|
|
<batchtest>
|
|
|
|
|
<fileset dir="${build.dir}">
|
|
|
|
|
<custom
|
|
|
|
@ -109,4 +109,4 @@
|
|
|
|
|
<target name="clean">
|
|
|
|
|
<delete dir="${build.dir}" />
|
|
|
|
|
</target>
|
|
|
|
|
</project>
|
|
|
|
|
</project>
|
|
|
|
|