| [comment encoding = UTF-8 /] |
| [** |
| * Copyright (c) 2008, 2012 Obeo.<br/> |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Obeo - initial API and implementation |
| * @author sbegaudeau |
| */] |
| [module antCompiler('http://www.eclipse.org/acceleo/ui/acceleowizardmodel/3.1')] |
| |
| [** |
| * Generate the Ant task to launch the compilation from Ant. |
| * @param anAcceleoMainClass The Acceleo main class. |
| * @param eclipseHome The relative path of the eclipse installation folder. |
| * @param workspaceHome The relative path of the workspace. |
| */] |
| [template public genAntCompiler(anAcceleoMainClass : AcceleoMainClass, eclipseHome : String, workspaceHome : String)] |
| [file ('buildstandalone.xml', false, 'UTF-8')][comment @main/] |
| <?xml version="1.0" encoding="UTF-8"?> |
| <project basedir="." default="compile" name="[anAcceleoMainClass.projectName/]"> |
| |
| <property name="ECLIPSE_HOME" value="[eclipseHome/]"/> |
| <property name="ECLIPSE_WORKSPACE" value="[workspaceHome/]"/> |
| |
| <property name="SOURCE_FOLDER" value="${basedir}/src/"/> |
| <property name="OUTPUT_FOLDER" value="${basedir}/bin/"/> |
| |
| <path id="[anAcceleoMainClass.projectName/].classpath"> |
| <path refid="[anAcceleoMainClass.projectName/].libraryclasspath" /> |
| </path> |
| |
| <!-- The classpath with only the dependencies used by the project (a dependency with the parser is required) --> |
| <path id="[anAcceleoMainClass.projectName/].libraryclasspath"> |
| <pathelement location="${ECLIPSE_WORKSPACE}/[anAcceleoMainClass.projectName/]/bin"/> |
| [for (classpathEntry : String | anAcceleoMainClass.resolvedClassPath)] |
| <pathelement location="[classpathEntry/]"/> |
| [/for] |
| </path> |
| |
| |
| <taskdef id="acceleoCompiler" name="acceleoCompiler" classname="org.eclipse.acceleo.parser.compiler.AcceleoCompiler" classpathref="[anAcceleoMainClass.projectName/].libraryclasspath" > |
| </taskdef> |
| |
| <!-- Change the value of the property SOURCE_FOLDERS to match the configuration of your project. --> |
| <target name="compile"> |
| <acceleoCompiler sourceFolder="${SOURCE_FOLDER}" |
| outputFolder="${OUTPUT_FOLDER}" |
| dependencies="" |
| binaryResource="false" |
| packagesToRegister="" <!-- example: org.eclipse.uml2.uml.UMLPackage;org.eclipse.emf.codegen.ecore.genmodel.GenModelPackage--> |
| trimPosition="false"> |
| </acceleoCompiler> |
| </target> |
| </project> |
| [/file] |
| [/template] |