Skip to content

Running Epsilon's Ant Tasks from Command Line

This example project shows how to download, configure and run Epsilon's Ant tasks from the command line using Ant, Maven and Gradle. To debug Epsilon scripts running from these tasks, read these instructions.

To run the examples below, you only need to have Ant, Maven or Gradle installed in your system.

Ant

When you run the ant command in the root directory of the project, the following will happen:

  • The build file (build.xml) will download Apache Ivy in a temporary directory
  • Ivy will fetch the required Epsilon jars (also in a temporary directory) from Maven Central/Sonatype
  • The build file will set up Epsilon's Ant tasks
  • The following part of the build file will be executed, which will load an EMF-based model and then run an EOL program against it
<epsilon.emf.loadModel name="Library" modelfile="library.model" 
    metamodelfile="library.ecore"/>

<epsilon.eol>
    for (writer in Writer.all) {
        (writer.name + " wrote " + writer.books.title.concat(", ")).println();
    }
    <model ref="Library"/>
</epsilon.eol>

If everything goes well, the last few lines of the output of the ant command should look like this:

run-epsilon:
[epsilon.eol] Agatha Christie wrote Endless Night

BUILD SUCCESSFUL

The complete source code is below and in Epsilon's Git repo.

<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>
    </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>
<ivy-module version="2.0">
    <info organisation="" module=""/>
    <configurations>
        <conf name="binaries" />
    </configurations>
    <dependencies>
        <dependency org="org.eclipse.epsilon" name="org.eclipse.epsilon.workflow" rev="2.4.0" conf="binaries->default"/>
        <dependency org="org.eclipse.epsilon" name="org.eclipse.epsilon.workflow.emf" rev="2.4.0" conf="binaries->default"/>
        <exclude artifact="org.eclipse.equinox.registry"/>
        <exclude artifact="org.eclipse.core.runtime"/>
    </dependencies>
</ivy-module>
<ivysettings>

    <settings defaultResolver="default-chain" defaultConflictManager="all" />

    <resolvers>
        <ibiblio name="maven-central"  m2compatible="true" usepoms="true" />
        <ibiblio name="sonatype-snapshots" root="https://oss.sonatype.org/content/repositories/snapshots" m2compatible="true"/>
        <chain name="default-chain">
            <resolver ref="sonatype-snapshots"/>
            <resolver ref="maven-central"/>
        </chain>
    </resolvers>

</ivysettings>

Maven

Since Maven can run Ant tasks, Epsilon Ant tasks can also be executed from a Maven build (mvn clean install) as shown below.

<project>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>epsilon-maven</artifactId>
  <groupId>org.eclipse.epsilon</groupId>
  <version>1.0-SNAPSHOT</version>
  <pluginRepositories>
    <pluginRepository>
        <id>Sonatype</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <configuration>
              <target>
                <!-- Set up the core Epsilon tasks -->
                <taskdef
                  resource="org/eclipse/epsilon/workflow/tasks/tasks.xml"/>

                <!-- Set up the Epsilon EMF tasks -->
                <taskdef
                  resource="org/eclipse/epsilon/workflow/tasks/emf/tasks.xml"/>

                <!-- 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>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.eclipse.epsilon</groupId>
            <artifactId>org.eclipse.epsilon.workflow</artifactId>
            <version>2.4.0</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.epsilon</groupId>
            <artifactId>org.eclipse.epsilon.workflow.emf</artifactId>
            <version>2.4.0</version>
          </dependency>
          <dependency>
            <groupId>org.eclipse.epsilon</groupId>
            <artifactId>org.eclipse.epsilon.eunit.cmp.emf</artifactId>
            <version>2.4.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>

Gradle

Since Gradle can also run Ant tasks, Epsilon Ant tasks can also be executed from a Gradle build (gradle run) as shown below.

configurations {
    epsilon
}

repositories {
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
    mavenCentral()
}

dependencies {
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.workflow:2.4.0'
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.workflow.emf:2.4.0'
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.eunit.cmp.emf:2.4.0'
}

task setupEpsilonTasks {
    // Set up the core Epsilon tasks
    ant.taskdef(resource: 'org/eclipse/epsilon/workflow/tasks/tasks.xml', 
        classpath: configurations.epsilon.asPath, loaderref: 'epsilon')
    // Set up the Epsilon EMF tasks
    ant.taskdef(resource: 'org/eclipse/epsilon/workflow/tasks/emf/tasks.xml', 
        classpath: configurations.epsilon.asPath, loaderref: 'epsilon')
    // Set logging level to info so that EOL's println() is not suppressed
    ant.lifecycleLogLevel = 'INFO'
}

task run {
    dependsOn tasks.setupEpsilonTasks
    // Load the library.model EMF model
    ant.'epsilon.emf.loadModel'(name: 'Library', 
        modelfile: 'library.model', metamodelfile: 'library.ecore')

    // Run library.eol against it
    ant.'epsilon.eol'(src: 'library.eol'){ model(ref: 'Library') }

    // Run library.eunit
    ant.'epsilon.eunit'(src: 'library.eunit'){
        modelTasks() {
            ant.'epsilon.emf.loadModel'(name: 'A', metamodelfile: 'library.ecore',
                read: 'false', store: 'false', modelfile: 'dummyA.model')
            ant.'epsilon.emf.loadModel'(name: 'B', metamodelfile: 'library.ecore',
                read: 'false', store: 'false', modelfile: 'dummyB.model')
        }
        comparators() {
            comparator(classname:
                'org.eclipse.epsilon.eunit.cmp.emf.EMFModelComparator')
        }
    }
}

Flexmi and Emfatic

You can also use Flexmi instead of XMI (library.flexmi instead of library.model) for the model, and Emfatic instead of Ecore (library.emf instead of library.ecore) by adding the following dependency to your ANT/Maven/Gradle build.

<dependency org="org.eclipse.emfatic" name="org.eclipse.emfatic.core" rev="1.1.0-SNAPSHOT" conf="binaries->default"/>
<dependency>
    <groupId>org.eclipse.emfatic</groupId>
    <artifactId>org.eclipse.emfatic.core</artifactId>
    <version>1.1.0-SNAPSHOT</version>
</dependency>
epsilon 'org.eclipse.emfatic:org.eclipse.emfatic.core:1.1.0-SNAPSHOT'

A complete Gradle example that uses library.flexmi instead of (the XMI-based) library.model, and library.emf instead of library.ecore is shown below.

configurations {
    epsilon
}

repositories {
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
    mavenCentral()
}

dependencies {
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.workflow:2.4.0'
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.workflow.emf:2.4.0'
    epsilon ('org.eclipse.emfatic:org.eclipse.emfatic.core:1.1.0-SNAPSHOT') {
        exclude group: 'org.eclipse.platform'
    }
}

task setupEpsilonTasks {
    // Set up the core Epsilon tasks
    ant.taskdef(resource: 'org/eclipse/epsilon/workflow/tasks/tasks.xml', 
        classpath: configurations.epsilon.asPath, loaderref: 'epsilon')
    // Set up the Epsilon EMF tasks
    ant.taskdef(resource: 'org/eclipse/epsilon/workflow/tasks/emf/tasks.xml', 
        classpath: configurations.epsilon.asPath, loaderref: 'epsilon')
    // Set logging level to info so that EOL's println() is not suppressed
    ant.lifecycleLogLevel = 'INFO'
}

task run {
    dependsOn tasks.setupEpsilonTasks
    // Load the library.flexmi EMF model
    ant.'epsilon.emf.loadModel'(name: 'Library', 
        modelfile: '../library.flexmi', metamodelfile: '../library.emf')

    // Run library.eol against it
    ant.'epsilon.eol'(src: '../library.eol'){ model(ref: 'Library') }
}
for (writer in Writer.all) {
    (writer.name + " wrote " + writer.books.title.concat(", ")).println();
}
<?nsuri library?>
<library>
  <writer name="Agatha Christie"/>
  <book title="Endless Night" pages="224" author="Agatha Christie"/>
</library>
@namespace(uri="library", prefix="")
package library;

class Library {
    val Writer[*] writers;
    val Book[*] books;
}

class Writer {
    attr String name;
    ref Book[*]#author books;
}

class Book {
    attr String title;
    attr int pages = 100;
    attr BookCategory category;
    ref Writer[1]#books author;
}

enum BookCategory {
    Mystery = 0;
    ScienceFiction = 1;
    Biography = 2;
}

Excel

The example below demonstrates using the generic epsilon.loadModel task to run the same EOL program against an Excel spreadsheet.

configurations {
    epsilon
}

repositories {
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
    mavenCentral()
}

dependencies {
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.workflow:2.4.0'
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.emc.spreadsheets.excel:2.4.0'
}

task setupEpsilonTasks {
    // Set up the core Epsilon tasks
    ant.taskdef(resource: 'org/eclipse/epsilon/workflow/tasks/tasks.xml', 
        classpath: configurations.epsilon.asPath, loaderref: 'epsilon')
    // Set logging level to info so that EOL's println() is not suppressed
    ant.lifecycleLogLevel = 'INFO'
}

task run {
    dependsOn tasks.setupEpsilonTasks
    // Load the library.xlsx spreadsheet
    ant.'epsilon.loadModel'(name: 'Library', impl: 'org.eclipse.epsilon.emc.spreadsheets.excel.ExcelModel'){
        parameter(name: 'SPREADSHEET_FILE', file: 'library.xlsx')
        parameter(name: 'CONFIGURATION_FILE', file: 'mapping.xml')
    }

    // Run library.eol against it
    ant.'epsilon.eol'(src: '../library.eol'){ model(ref: 'Library') }
}
<spreadsheet>
  <worksheet name="Writer">
    <column name="name"/>
    <column name="books" many="true"/>
  </worksheet>
  <worksheet name="Book">
    <column name="id"/>
    <column name="title"/>    
    <column name="pages" datatype="integer"/>
  </worksheet>
  <reference source="Writer->books"
             target="Book->id"/>                    
</spreadsheet>

UML

Models conforming to the Eclipse UML2 metamodel can be queried as shown below.

configurations {
    epsilon
}

repositories {
    maven {
        url "https://repo.eclipse.org/content/repositories/acceleo-releases/"
    }
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
    mavenCentral()
}

dependencies {
    epsilon('org.eclipse.epsilon:org.eclipse.epsilon.emc.uml:2.4.0') {
        // UML2 is broken on Maven Central
        exclude group: 'org.eclipse.uml2'
    }
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.workflow:2.4.0'

    // Fetch the UML2 dependencies from repo.eclipse.org instead
    epsilon 'org.eclipse.uml2:org.eclipse.uml2.uml:5.0.1.v20140910-1354'
    epsilon 'org.eclipse.uml2:org.eclipse.uml2.common:2.0.1.v20140910-1354'
    epsilon 'org.eclipse.uml2:org.eclipse.uml2.types:2.0.0.v20140910-1354'
}

task setupEpsilonTasks {

    // Set up the core Epsilon tasks
    ant.taskdef(resource: 'org/eclipse/epsilon/workflow/tasks/tasks.xml', 
        classpath: configurations.epsilon.asPath, loaderref: 'epsilon')

    // Set logging level to info so that EOL's println() is not suppressed
    ant.lifecycleLogLevel = 'INFO'
}

task run {
    dependsOn tasks.setupEpsilonTasks

    // Load a UML model from model.uml
    ant.'epsilon.loadModel'(name: 'UML', impl: 'org.eclipse.epsilon.emc.uml.UmlModel'){
        parameter(name: 'modelFile', file: 'model.uml')
    }

    // Run library.eol against it
    ant.'epsilon.eol'(src: 'uml.eol'){ model(ref: 'UML') }

}
// Print the names of all
// classes in the model
for (c in Class.all) {
    c.name.println();
}
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
  <uml:Model xmi:id="_in3dgJiMEeuzROqeHhotPw" name="umlcddemo">
    <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
      <eAnnotations xmi:id="_in3dgJiMEeuzROqeHhotPw0" source="genmymodel">
        <details xmi:id="_in3dgJiMEeuzROqeHhotPw00" key="uuid" value="_in3dgJiMEeuzROqeHhotPw"/>
        <details xmi:id="_in3dgJiMEeuzROqeHhotPw01" key="author" value="kolovos"/>
      </eAnnotations>
    </xmi:Extension>
    <packageImport xmi:id="_in3dgZiMEeuzROqeHhotPw" importingNamespace="_in3dgJiMEeuzROqeHhotPw">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_in3dgZiMEeuzROqeHhotPw0" source="genmymodel">
          <details xmi:id="_in3dgZiMEeuzROqeHhotPw00" key="uuid" value="_in3dgZiMEeuzROqeHhotPw"/>
        </eAnnotations>
      </xmi:Extension>
      <importedPackage href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#/"/>
    </packageImport>
    <packagedElement xsi:type="uml:Class" xmi:id="_rAoBcHq6EDmVkdImmyh-dQ" name="Project">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_rAoBcHq6EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_rAoBcHq6EDmVkdImmyh-dQ00" key="uuid" value="_rAoBcHq6EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
    </packagedElement>
    <packagedElement xsi:type="uml:Class" xmi:id="_xAOzcHq6EDmVkdImmyh-dQ" name="Task">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_xAOzcHq6EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_xAOzcHq6EDmVkdImmyh-dQ00" key="uuid" value="_xAOzcHq6EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
    </packagedElement>
    <packagedElement xsi:type="uml:Association" xmi:id="_yHEfsXq6EDmVkdImmyh-dQ" name="Project_Task" memberEnd="_yHD4oXq6EDmVkdImmyh-dQ _yHCqgHq6EDmVkdImmyh-dQ" navigableOwnedEnd="_yHCqgHq6EDmVkdImmyh-dQ _yHD4oXq6EDmVkdImmyh-dQ">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_yHEfsXq6EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_yHEfsXq6EDmVkdImmyh-dQ00" key="uuid" value="_yHEfsXq6EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
      <ownedEnd xmi:id="_yHCqgHq6EDmVkdImmyh-dQ" name="project" type="_rAoBcHq6EDmVkdImmyh-dQ" owningAssociation="_yHEfsXq6EDmVkdImmyh-dQ" association="_yHEfsXq6EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_yHCqgHq6EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_yHCqgHq6EDmVkdImmyh-dQ00" key="uuid" value="_yHCqgHq6EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_yHDRkHq6EDmVkdImmyh-dQ" value="1">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_yHDRkHq6EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_yHDRkHq6EDmVkdImmyh-dQ00" key="uuid" value="_yHDRkHq6EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralInteger" xmi:id="_yHD4oHq6EDmVkdImmyh-dQ" value="1">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_yHD4oHq6EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_yHD4oHq6EDmVkdImmyh-dQ00" key="uuid" value="_yHD4oHq6EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
      <ownedEnd xmi:id="_yHD4oXq6EDmVkdImmyh-dQ" name="tasks" type="_xAOzcHq6EDmVkdImmyh-dQ" owningAssociation="_yHEfsXq6EDmVkdImmyh-dQ" association="_yHEfsXq6EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_yHD4oXq6EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_yHD4oXq6EDmVkdImmyh-dQ00" key="uuid" value="_yHD4oXq6EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_yHD4onq6EDmVkdImmyh-dQ">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_yHD4onq6EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_yHD4onq6EDmVkdImmyh-dQ00" key="uuid" value="_yHD4onq6EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralUnlimitedNatural" xmi:id="_zUmCwHq6EDmVkdImmyh-dQ" value="*">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_zUmCwHq6EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_zUmCwHq6EDmVkdImmyh-dQ00" key="uuid" value="_zUmCwHq6EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
    </packagedElement>
    <packagedElement xsi:type="uml:Class" xmi:id="_86ZfYHq6EDmVkdImmyh-dQ" name="Person">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_86ZfYHq6EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_86ZfYHq6EDmVkdImmyh-dQ00" key="uuid" value="_86ZfYHq6EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
    </packagedElement>
    <packagedElement xsi:type="uml:Association" xmi:id="_-j5z0nq6EDmVkdImmyh-dQ" name="Project_Person" memberEnd="_-j5Mwnq6EDmVkdImmyh-dQ _-j4lsnq6EDmVkdImmyh-dQ" navigableOwnedEnd="_-j4lsnq6EDmVkdImmyh-dQ _-j5Mwnq6EDmVkdImmyh-dQ">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_-j5z0nq6EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_-j5z0nq6EDmVkdImmyh-dQ00" key="uuid" value="_-j5z0nq6EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
      <ownedEnd xmi:id="_-j4lsnq6EDmVkdImmyh-dQ" name="project" type="_rAoBcHq6EDmVkdImmyh-dQ" owningAssociation="_-j5z0nq6EDmVkdImmyh-dQ" association="_-j5z0nq6EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_-j4lsnq6EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_-j4lsnq6EDmVkdImmyh-dQ00" key="uuid" value="_-j4lsnq6EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_-j5MwHq6EDmVkdImmyh-dQ" value="1">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_-j5MwHq6EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_-j5MwHq6EDmVkdImmyh-dQ00" key="uuid" value="_-j5MwHq6EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralInteger" xmi:id="_-j5MwXq6EDmVkdImmyh-dQ" value="1">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_-j5MwXq6EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_-j5MwXq6EDmVkdImmyh-dQ00" key="uuid" value="_-j5MwXq6EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
      <ownedEnd xmi:id="_-j5Mwnq6EDmVkdImmyh-dQ" name="persons" type="_86ZfYHq6EDmVkdImmyh-dQ" owningAssociation="_-j5z0nq6EDmVkdImmyh-dQ" association="_-j5z0nq6EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_-j5Mwnq6EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_-j5Mwnq6EDmVkdImmyh-dQ00" key="uuid" value="_-j5Mwnq6EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_-j5z0Hq6EDmVkdImmyh-dQ">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_-j5z0Hq6EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_-j5z0Hq6EDmVkdImmyh-dQ00" key="uuid" value="_-j5z0Hq6EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralUnlimitedNatural" xmi:id="_Ctk-8Hq7EDmVkdImmyh-dQ" value="*">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_Ctk-8Hq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_Ctk-8Hq7EDmVkdImmyh-dQ00" key="uuid" value="_Ctk-8Hq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
    </packagedElement>
    <packagedElement xsi:type="uml:Class" xmi:id="_FYr6UHq7EDmVkdImmyh-dQ" name="Effort">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_FYr6UHq7EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_FYr6UHq7EDmVkdImmyh-dQ00" key="uuid" value="_FYr6UHq7EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
    </packagedElement>
    <packagedElement xsi:type="uml:Association" xmi:id="_HOgzgXq7EDmVkdImmyh-dQ" name="Effort_Person" memberEnd="_HOgMcHq7EDmVkdImmyh-dQ _HOeXQnq7EDmVkdImmyh-dQ" navigableOwnedEnd="_HOeXQnq7EDmVkdImmyh-dQ _HOgMcHq7EDmVkdImmyh-dQ">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_HOgzgXq7EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_HOgzgXq7EDmVkdImmyh-dQ00" key="uuid" value="_HOgzgXq7EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
      <ownedEnd xmi:id="_HOeXQnq7EDmVkdImmyh-dQ" name="effort" type="_FYr6UHq7EDmVkdImmyh-dQ" owningAssociation="_HOgzgXq7EDmVkdImmyh-dQ" association="_HOgzgXq7EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_HOeXQnq7EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_HOeXQnq7EDmVkdImmyh-dQ00" key="uuid" value="_HOeXQnq7EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_HOflYHq7EDmVkdImmyh-dQ">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_HOflYHq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_HOflYHq7EDmVkdImmyh-dQ00" key="uuid" value="_HOflYHq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralUnlimitedNatural" xmi:id="_N8H7AHq7EDmVkdImmyh-dQ" value="*">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_N8H7AHq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_N8H7AHq7EDmVkdImmyh-dQ00" key="uuid" value="_N8H7AHq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
      <ownedEnd xmi:id="_HOgMcHq7EDmVkdImmyh-dQ" name="person" type="_86ZfYHq6EDmVkdImmyh-dQ" owningAssociation="_HOgzgXq7EDmVkdImmyh-dQ" association="_HOgzgXq7EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_HOgMcHq7EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_HOgMcHq7EDmVkdImmyh-dQ00" key="uuid" value="_HOgMcHq7EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_HOgMcXq7EDmVkdImmyh-dQ">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_HOgMcXq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_HOgMcXq7EDmVkdImmyh-dQ00" key="uuid" value="_HOgMcXq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralInteger" xmi:id="_HOgzgHq7EDmVkdImmyh-dQ" value="1">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_HOgzgHq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_HOgzgHq7EDmVkdImmyh-dQ00" key="uuid" value="_HOgzgHq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
    </packagedElement>
    <packagedElement xsi:type="uml:Association" xmi:id="_JLgrt3q7EDmVkdImmyh-dQ" name="Effort_Task" memberEnd="_JLgrtHq7EDmVkdImmyh-dQ _JLgrsXq7EDmVkdImmyh-dQ" navigableOwnedEnd="_JLgrsXq7EDmVkdImmyh-dQ _JLgrtHq7EDmVkdImmyh-dQ">
      <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
        <eAnnotations xmi:id="_JLgrt3q7EDmVkdImmyh-dQ0" source="genmymodel">
          <details xmi:id="_JLgrt3q7EDmVkdImmyh-dQ00" key="uuid" value="_JLgrt3q7EDmVkdImmyh-dQ"/>
        </eAnnotations>
      </xmi:Extension>
      <ownedEnd xmi:id="_JLgrsXq7EDmVkdImmyh-dQ" name="effort" type="_FYr6UHq7EDmVkdImmyh-dQ" owningAssociation="_JLgrt3q7EDmVkdImmyh-dQ" association="_JLgrt3q7EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_JLgrsXq7EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_JLgrsXq7EDmVkdImmyh-dQ00" key="uuid" value="_JLgrsXq7EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_JLgrsnq7EDmVkdImmyh-dQ">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_JLgrsnq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_JLgrsnq7EDmVkdImmyh-dQ00" key="uuid" value="_JLgrsnq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralUnlimitedNatural" xmi:id="_TnCPYHq7EDmVkdImmyh-dQ" value="*">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_TnCPYHq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_TnCPYHq7EDmVkdImmyh-dQ00" key="uuid" value="_TnCPYHq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
      <ownedEnd xmi:id="_JLgrtHq7EDmVkdImmyh-dQ" name="task" type="_xAOzcHq6EDmVkdImmyh-dQ" owningAssociation="_JLgrt3q7EDmVkdImmyh-dQ" association="_JLgrt3q7EDmVkdImmyh-dQ">
        <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
          <eAnnotations xmi:id="_JLgrtHq7EDmVkdImmyh-dQ0" source="genmymodel">
            <details xmi:id="_JLgrtHq7EDmVkdImmyh-dQ00" key="uuid" value="_JLgrtHq7EDmVkdImmyh-dQ"/>
          </eAnnotations>
        </xmi:Extension>
        <lowerValue xsi:type="uml:LiteralInteger" xmi:id="_JLgrtXq7EDmVkdImmyh-dQ" value="1">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_JLgrtXq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_JLgrtXq7EDmVkdImmyh-dQ00" key="uuid" value="_JLgrtXq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </lowerValue>
        <upperValue xsi:type="uml:LiteralInteger" xmi:id="_JLgrtnq7EDmVkdImmyh-dQ" value="1">
          <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore">
            <eAnnotations xmi:id="_JLgrtnq7EDmVkdImmyh-dQ0" source="genmymodel">
              <details xmi:id="_JLgrtnq7EDmVkdImmyh-dQ00" key="uuid" value="_JLgrtnq7EDmVkdImmyh-dQ"/>
            </eAnnotations>
          </xmi:Extension>
        </upperValue>
      </ownedEnd>
    </packagedElement>
  </uml:Model>
</xmi:XMI>

GenMyModel

GenMyModel is a web-based modelling tool that can be used to create UML2-compliant models. You can consume the XMI representation of a public GenMyModel UML model directly from Epsilon as shown below.

configurations {
    epsilon
}

repositories {
    maven {
        url "https://repo.eclipse.org/content/repositories/acceleo-releases/"
    }
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
    mavenCentral()
}

dependencies {
    epsilon('org.eclipse.epsilon:org.eclipse.epsilon.emc.uml:2.4.0') {
        // UML2 is broken on Maven Central
        exclude group: 'org.eclipse.uml2'
    }
    epsilon 'org.eclipse.epsilon:org.eclipse.epsilon.workflow:2.4.0'

    // Fetch the UML2 dependencies from repo.eclipse.org instead
    epsilon 'org.eclipse.uml2:org.eclipse.uml2.uml:5.0.1.v20140910-1354'
    epsilon 'org.eclipse.uml2:org.eclipse.uml2.common:2.0.1.v20140910-1354'
    epsilon 'org.eclipse.uml2:org.eclipse.uml2.types:2.0.0.v20140910-1354'
}

task setupEpsilonTasks {

    // Set up the core Epsilon tasks
    ant.taskdef(resource: 'org/eclipse/epsilon/workflow/tasks/tasks.xml', 
        classpath: configurations.epsilon.asPath, loaderref: 'epsilon')

    // Set logging level to info so that EOL's println() is not suppressed
    ant.lifecycleLogLevel = 'INFO'
}

task run {
    dependsOn tasks.setupEpsilonTasks

    // Load a UML model straight from GenMyModel
    ant.'epsilon.loadModel'(name: 'UML', impl: 'org.eclipse.epsilon.emc.uml.UmlModel'){
        parameter(name: 'modelUri', value: 'https://app.genmymodel.com/api/projects/_in3dgJiMEeuzROqeHhotPw/custom-xmi')
    }

    // Run library.eol against it
    ant.'epsilon.eol'(src: '../uml.eol'){ model(ref: 'UML') }


}

Epsilon 1.x

If you would like to use an older (1.x) version of Epsilon, you can use this example instead, which uses a fat jar we used to produce (epsilon-1.x-kitchensink.jar) before moving all our jars to Maven Central/Sonatype.