| [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 antRunnerTarget('http://www.eclipse.org/acceleo/ui/acceleowizardmodel/3.1')/] |
| |
| [** |
| * Generate the Ant runner target file. |
| * @param anAcceleoMainClass The Acceleo main class. |
| */] |
| [template public genAntRunnerTarget(anAcceleoMainClass : AcceleoMainClass, eclipseHome : String, workspaceHome : String)] |
| [comment @main /] |
| [file (anAcceleoMainClass.moduleFileShortName + 'Target.xml', false, 'UTF-8')] |
| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- Place this file in the target project and call it with "External Tools > Run As > Ant Build" --> |
| <!-- You have to change the MODEL and the TARGET values --> |
| |
| <project basedir="." default="[anAcceleoMainClass.moduleFileShortName/]Sample" name="[anAcceleoMainClass.projectName/]Sample"> |
| <import file="../../[anAcceleoMainClass.projectName/]/tasks/[anAcceleoMainClass.moduleFileShortName/].xml"/> |
| |
| <!-- Change the values of MODEL and TARGET to point to your model and output folder --> |
| <property name="MODEL" value="${basedir}/model/file.xmi"/> |
| <property name="TARGET" value="${basedir}/src-gen"/> |
| |
| <target name="[anAcceleoMainClass.moduleFileShortName/]Sample" description="Generate files in 'TARGET'"> |
| <antcall target="[anAcceleoMainClass.moduleFileShortName/]" > |
| <param name="model" value="${MODEL}"/> |
| <param name="target" value="${TARGET}"/> |
| </antcall> |
| </target> |
| </project> |
| [/file] |
| [/template] |