blob: 209116add3df62096fec29c84b3556b004007aac [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.eclipse.ocl.examples" default="zip.examples" basedir=".">
<target name="init">
</target>
<patternset id="zip.excludes"
excludes="src.zip,build.xml,javaCompiler*,temp.folder/**,@dot/**"/>
<target name="zip.examples" depends="init">
<!-- adolfosbh: New since git migration:
OCL plugins (including examples) will be located in the local git repository, so we can't access
non-OCL examples via relative paths.
All OCL examples (bundles and non-bundles) will be located in the same "examples" folder
in the local git repository. So the parent folder for them may be set using relative paths
in both hudson server and developer Eclipse workspace:
- Developer Eclipse Workspace:
Bundles: ../
Non-Bundles: ../
- Hudson:
Bundles: ../
Non-Bundles: ../
Concerning Non-OCL examples, everyone should be in the developer's Eclipe workspace. In hudson servers,
Non-ocl plugins will be located in the buckminsters workspace, but the location will vary if it's a bundle
or a non-bundle example:
- Developer Eclipse Workspace:
Bundles: Eclipse_workspace_root
Non-Bundles: Eclipse_workspace_root
- Hudson:
Bundles: Buckminster_workspace_root/plugins
Non-Bundles: Bukminster_workspaceoot
-->
<!-- <condition property="examplesDir" value="../../examples/" else="../">
<available file="../../examples" type="dir"/>
</condition> -->
<!-- Bundles are materialized by buckminster into the plugins folder at the workspace root -->
<!-- <property name="bundlesDir" value="../"/> -->
<!-- Non-Bundles are materialized by buckminster into the workspace root -->
<!-- <condition property="nonBundlesDir" value="../../" else="../">
<available file="../../org.eclipse.ocl.examples.project.empty" type="dir"/>
</condition>-->
<property name="oclExamplesDir" value="../"/>
<property name="nonOclNonBundlesDir" value="${workspace.root}"/>
<condition property="nonOclBundlesDir" value="${workspace.root}" else="${workspace.root}/plugins">
<available file="${workspace.root}/org.eclipse.emf.examples.library" type="dir"/>
</condition>
<!-- OCL Bundles examples -->
<zip destfile="zips/interpreter.zip" basedir="${oclExamplesDir}/org.eclipse.ocl.examples.interpreter">
<patternset refid="zip.excludes"/>
</zip>
<!-- OCL Non-Bundles examples -->
<zip destfile="zips/empty.zip" basedir="${oclExamplesDir}/org.eclipse.ocl.examples.project.empty">
<patternset refid="zip.excludes"/>
</zip>
<zip destfile="zips/oclinecoretutorial.zip" basedir="${oclExamplesDir}/org.eclipse.ocl.examples.project.oclinecoretutorial">
<patternset refid="zip.excludes"/>
</zip>
<zip destfile="zips/royalandloyal.zip" basedir="${oclExamplesDir}/org.eclipse.ocl.examples.project.royalandloyal">
<patternset refid="zip.excludes"/>
</zip>
<!-- EMF Bundles examples -->
<zip destfile="zips/library.zip" basedir="${nonOclBundlesDir}/org.eclipse.emf.examples.library"/>
<zip destfile="zips/libraryEdit.zip" basedir="${nonOclBundlesDir}/org.eclipse.emf.examples.library.edit"/>
<zip destfile="zips/libraryEditor.zip" basedir="${nonOclBundlesDir}/org.eclipse.emf.examples.library.editor"/>
</target>
<target name="clean" depends="init" description="Clean the plug-in: org.eclipse.ocl.examples.">
<delete>
<fileset dir="zips" includes="*.zip"/>
</delete>
<antcall target="refresh"/>
</target>
<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
<eclipse.refreshLocal resource="/org.eclipse.ocl.examples" depth="infinite"/>
</target>
</project>