blob: d81e12fa6851ed9d23a7ee7c881f35900dcd57f1 [file] [log] [blame]
<project default="run-epsilon" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- This part of the build file runs our Epsilon tasks -->
<target name="run-epsilon" depends="setup-epsilon">
<!-- Load the library.model EMF model -->
<epsilon.emf.loadModel name="Library" modelfile="library.model" metamodelfile="library.ecore"/>
<!-- Run library.eol against it -->
<epsilon.eol src="library.eol">
<model ref="Library"/>
</epsilon.eol>
<!-- Run library.eunit -->
<epsilon.eunit src="library.eunit">
<modelTasks>
<epsilon.emf.loadModel name="A" metamodelfile="library.ecore" read="false" store="false" modelfile="dummyA.model"/>
<epsilon.emf.loadModel name="B" metamodelfile="library.ecore" read="false" store="false" modelfile="dummyB.model"/>
</modelTasks>
<comparators>
<comparator classname="org.eclipse.epsilon.eunit.cmp.emf.EMFModelComparator" />
</comparators>
</epsilon.eunit>
</target>
<!-- The rest of the build file downloads Ivy, fetches the Epsilon jars and sets up the Epsilon ANT tasks -->
<property name="ivy.version" value="2.5.0"/>
<property name="ivy.jar.dir" value="${basedir}/ivy"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
<!-- Downloads Ivy -->
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.jar.dir}"/>
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<!-- Sets up the Ivy ANT tasks -->
<target name="setup-ivy" depends="download-ivy">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="setup-epsilon" depends="setup-ivy">
<!-- Uncomment the line below to clear Ivy's cache -->
<!--ivy:cleancache/-->
<ivy:settings file="ivysettings.xml" />
<!-- Fetch all relevant Epsilon jars under lib/binaries -->
<ivy:retrieve conf="binaries" pattern="lib/[conf]/[artifact](-[classifier]).[ext]"/>
<!-- Construct a path from all the jars under lib/binaries -->
<path id="lib.path">
<fileset dir="lib/binaries" includes="*.jar"/>
</path>
<!-- Load the ANT tasks from o.e.e.workflow and o.e.e.workflow.emf using the same classloader -->
<taskdef classpathref="lib.path" resource="org/eclipse/epsilon/workflow/tasks/tasks.xml" loaderref="lib.path.loader"/>
<taskdef classpathref="lib.path" resource="org/eclipse/epsilon/workflow/tasks/emf/tasks.xml" loaderref="lib.path.loader"/>
</target>
</project>