Skip to content

Instantly share code, notes, and snippets.

@ujhelyiz
Created December 12, 2010 22:30
Show Gist options
  • Save ujhelyiz/738410 to your computer and use it in GitHub Desktop.
Save ujhelyiz/738410 to your computer and use it in GitHub Desktop.
A simple Ant script that can be used inside Eclipse as a builder for Ecore code generation.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
Nov 16, 2010 10:33:34 PM
org.eclipse.viatra2.gtasm.model
A test build script to execute GTASM model generation
Zoltan Ujhelyi
====================================================================== -->
<project name="org.eclipse.viatra2.gtasm.model" default="default">
<description>
A test build script to execute GTASM model generation
</description>
<!-- =================================
target: default
================================= -->
<target name="default" description="A build script to execute GTASM model generation">
<emf.Ecore2Java
genModel="org.eclipse.viatra2.gtasm.model/model/gtasmmodel_updated.genmodel"
model="org.eclipse.viatra2.gtasm.model/model/gtasmmodel.ecore"
generatemodelproject="true"
generateeditorproject="yes"
generateeditproject="true"
reconcilegenmodel="reload">
<arg line="-modelProject org.eclipse.viatra2.gtasm.model src" />
<arg line="-editProject org.eclipse.viatra2.gtasm.edit src" />
<arg line="-editorProject org.eclipse.viatra2.gtasm.editor src" />
</emf.Ecore2Java>
<!-- The following calls are used to avoid spurious errors regarding
incorrect build order, however, they only work with Buckminster
installed. If you do not have or want Buckminster installed,
remove them -->
<eclipse.build projectname="org.eclipse.viatra2.gtasm.model" />
<eclipse.build projectname="org.eclipse.viatra2.gtasm.model.edit" />
<eclipse.build projectname="org.eclipse.viatra2.gtasm.model.editor" />
</target>
<target name="clean" description="A script to remove the src folders">
<delete includeemptydirs="true" defaultexcludes="no">
<fileset dir="org.eclipse.viatra2.gtasm.model" includes="src/" />
<fileset dir="org.eclipse.viatra2.gtasm.model.edit" includes="src/" />
<fileset dir="org.eclipse.viatra2.gtasm.model.editor" includes="src/" />
</delete>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment