[openrtm-commit:01840] r581 - in trunk/rtmtools/lib/a4e-2137: . macros
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 3月 10日 (木) 12:37:28 JST
Author: ga
Date: 2016-03-10 12:37:28 +0900 (Thu, 10 Mar 2016)
New Revision: 581
Added:
trunk/rtmtools/lib/a4e-2137/macros/
trunk/rtmtools/lib/a4e-2137/macros/a4e-jdt-macros.xml
trunk/rtmtools/lib/a4e-2137/macros/a4e-pde-macros.xml
trunk/rtmtools/lib/a4e-2137/macros/a4e-platform-macros.xml
trunk/rtmtools/lib/a4e-2137/version.txt
Log:
Added: trunk/rtmtools/lib/a4e-2137/macros/a4e-jdt-macros.xml
===================================================================
--- trunk/rtmtools/lib/a4e-2137/macros/a4e-jdt-macros.xml (rev 0)
+++ trunk/rtmtools/lib/a4e-2137/macros/a4e-jdt-macros.xml 2016-03-10 03:37:28 UTC (rev 581)
@@ -0,0 +1,184 @@
+<?xml version="1.0"?>
+<project name="a4e-jdt-macros" basedir="." xmlns:ant4eclipse="antlib:org.ant4eclipse" xmlns:antcontrib="antlib:net.sf.antcontrib">
+
+ <!-- define antcontrib tasks -->
+ <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" />
+
+ <!-- define ant4eclipse tasks -->
+ <taskdef uri="antlib:org.ant4eclipse" resource="org/ant4eclipse/antlib.xml" />
+
+ <!-- ===============================================================================================================
+ macro: createCompilerOptionFile
+
+ Generates an option file used for the compilation process. Especially useful to generate preferences with
+ default settings.
+
+ Parameters:
+ - destination: the location where the file will be written to.
+ - sourcelevel: the language level for the sources.
+ - targetlevel: the level for the generated byte code.
+ ==============================================================================================================
+ -->
+ <macrodef name="createCompilerOptionFile">
+ <attribute name="destination" />
+ <attribute name="sourcelevel" default="1.5" />
+ <attribute name="targetlevel" default="1.5" />
+ <sequential>
+ <echo file="@{destination}">eclipse.preferences.version=1${line.separator}</echo>
+ <echo file="@{destination}" append="true">org.eclipse.jdt.core.compiler.codegen.targetPlatform=@{targetlevel}${line.separator}</echo>
+ <echo file="@{destination}" append="true">org.eclipse.jdt.core.compiler.compliance=@{targetlevel}${line.separator}</echo>
+ <echo file="@{destination}" append="true">org.eclipse.jdt.core.compiler.source=@{sourcelevel}${line.separator}</echo>
+ </sequential>
+ </macrodef>
+
+ <!-- ===============================================================================================================
+ macro: buildJdtProject
+
+ builds a single JDT-based eclipse project
+ Parameters:
+ - workspace: the root directory of the workspace that contains the JDT project
+ - projectName: the name of the project that should be built (must exist in the workspace)
+ - targetPlatformId (optional): the id of the target platform that should be used when working with pde-projects
+ The following parameters control the source and target level:
+ - defaultCompilerOptionsFile (optional): A file that is used to set default compiler options
+ - targetLevel (optional): Specifies the class file version that should be generated by the compiler
+ - sourceLevel (optional): Specifies language version of the source files. Defaults to targetLevel.
+ Note: you only should set defaultCompilerOptionsFile *or* targetLevel/sourceLevel. If both are set,
+ defaultCompilerOptionsFile 'wins', i.e. overrides the target/sourceLevel argument
+ ==============================================================================================================
+ -->
+ <macrodef name="buildJdtProject" description="builds a single JDT-based eclipse project">
+ <attribute name="workspaceDirectory" />
+ <attribute name="projectName" />
+ <attribute name="targetPlatformId" default="" />
+ <attribute name="defaultCompilerOptionsFile" default="" />
+ <attribute name="targetLevel" default="" />
+ <attribute name="sourceLevel" default="@{targetLevel}" />
+
+ <!-- element definitions for lifecycle phases -->
+ <element name="initialize" optional="true" description="Initialize build state, e.g. set properties or create directories." />
+ <element name="generate-sources" optional="true" description="Generate any source code for inclusion in compilation." />
+ <element name="generate-resources" optional="true" description="Generate resources for inclusion in the package." />
+ <element name="pre-compile" optional="true" description="Execute additional steps before compilation." />
+ <element name="post-compile" optional="true" description="Post-process the generated files from compilation, for example to do bytecode enhancement on Java classes." />
+ <element name="post-copy-resources" optional="true" description="Post-process a source folder after resource have been copied to classes folder" />
+ <element name="postprocess-output-directory" optional="true" description="Post-process an output folder after sources have been compiled resources have been copied. " />
+ <element name="finish" optional="true" description="Finish the build process. This can be used to take further actions, like packaging the project" />
+
+ <sequential>
+
+ <echo>
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * * * Building project @{projectName}
+ * * * in workspace @{workspaceDirectory}
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ </echo>
+
+ <ant4eclipse:executeJdtProject workspaceDirectory="@{workspaceDirectory}" projectName="@{projectName}" prefix="buildJdtProject">
+ <jdtClasspathContainerArgument key="target.platform" value="@{targetPlatformId}" />
+
+
+ <ant4eclipse:forProject>
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 1: Initialize
+ - Initialize build state, e.g. set properties or create directories.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- template element 'intialize' -->
+ <initialize />
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 2: Generate-sources
+ - Generate any source code for inclusion in compilation.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- template element 'generate-sources' -->
+ <generate-sources />
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 3: Generate-resources
+ - Generate resources for inclusion in the package.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- template element 'generate-resources' -->
+ <generate-resources />
+ </ant4eclipse:forProject>
+
+ <!-- Step 4: clean output directories -->
+ <!-- Step 4: clean output directories -->
+ <ant4eclipse:forEachOutputDirectory>
+ <antcontrib:if>
+ <equals arg1="${buildJdtProject.output.directory}" arg2="${buildJdtProject.project.directory}" />
+ <antcontrib:then>
+ <echo level="warning"> * NOT cleaning output directory '${buildJdtProject.output.directory}' as it points to the projects (${buildJdtProject.project.name}) root folder</echo>
+ </antcontrib:then>
+ <antcontrib:else>
+ <echo> * Cleaning output directory '${buildJdtProject.output.directory}' project: ${buildJdtProject.project.directory}</echo>
+ <delete dir="${buildJdtProject.output.directory}" quiet="true" />
+ <mkdir dir="${buildJdtProject.output.directory}" />
+ </antcontrib:else>
+ </antcontrib:if>
+ </ant4eclipse:forEachOutputDirectory>
+
+ <!-- Step 5: Compile the project (as long as it has at least one source dir) using the eclipse java compiler (ejc) -->
+ <ant4eclipse:forProject filter="(buildJdtProject.source.directories=*)">
+
+ <!-- template element 'pre-compile' -->
+ <pre-compile />
+
+ <echo>Compiling jdt project '${buildJdtProject.project.name}'</echo>
+ <echo> - source directories -> ${buildJdtProject.source.directories}</echo>
+ <echo> - output directories -> ${buildJdtProject.default.output.directory}</echo>
+ <echo> - bootclasspath -> ${buildJdtProject.boot.classpath}</echo>
+ <echo> - classpath -> ${buildJdtProject.classpath.absolute.compiletime}</echo>
+ <javac compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter" source="@{sourceLevel}" target="@{targetLevel}">
+ <!-- let ecj read compiler settings from the project's '.settings' directory -->
+ <compilerarg value="compiler.options.file=${buildJdtProject.project.directory}/.settings/org.eclipse.jdt.core.prefs" compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter" />
+
+ <!-- Set default options if no project specific settings have been made -->
+ <compilerarg value="default.compiler.options.file=@{defaultCompilerOptionsFile}" compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter" />
+
+ <!-- Set Compiler Arguments from 'executeJdtProject' task (source folders, access restrictions) -->
+ <compilerarg value="compiler.args.refid=buildJdtProject.compiler.args" compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter" />
+
+ <!-- set the source folders that are passed in from 'fromProject' -->
+ <src refid="buildJdtProject.source.directories.path" />
+
+ <!-- set the bootclasspath, i.e. the JRE we compile against -->
+ <bootclasspath refid="buildJdtProject.boot.classpath.path" />
+
+ <!-- set our compile-time classpath -->
+ <classpath refid="buildJdtProject.classpath.absolute.compiletime.path" />
+ </javac>
+
+ <!-- template element 'post-compile' -->
+ <post-compile />
+
+ </ant4eclipse:forProject>
+
+ <!-- Step 6: Copy resources (non-java-files) from sourcedirectories to their output directories -->
+ <ant4eclipse:forEachSourceDirectory>
+ <echo>Copying resources from directory '${buildJdtProject.source.directory}' to '${buildJdtProject.output.directory}'</echo>
+ <copy todir="${buildJdtProject.output.directory}">
+ <fileset dir="${buildJdtProject.source.directory}">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <!-- Invoke 'post-copy-resources' template to allow customized processing -->
+ <post-copy-resources />
+ </ant4eclipse:forEachSourceDirectory>
+
+ <!-- Step 7: Post-Process output directories -->
+ <ant4eclipse:forEachOutputDirectory>
+ <postprocess-output-directory />
+ </ant4eclipse:forEachOutputDirectory>
+
+ <!-- Step 8: Finish build process -->
+ <ant4eclipse:forProject>
+ <!-- Invoke 'finish' template -->
+ <finish />
+ </ant4eclipse:forProject>
+ </ant4eclipse:executeJdtProject>
+ </sequential>
+ </macrodef>
+</project>
\ No newline at end of file
Property changes on: trunk/rtmtools/lib/a4e-2137/macros/a4e-jdt-macros.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/rtmtools/lib/a4e-2137/macros/a4e-pde-macros.xml
===================================================================
--- trunk/rtmtools/lib/a4e-2137/macros/a4e-pde-macros.xml (rev 0)
+++ trunk/rtmtools/lib/a4e-2137/macros/a4e-pde-macros.xml 2016-03-10 03:37:28 UTC (rev 581)
@@ -0,0 +1,868 @@
+<?xml version="1.0"?>
+<project name="build"
+ basedir="."
+ xmlns:ant4eclipse="antlib:org.ant4eclipse"
+ xmlns:antcontrib="antlib:net.sf.antcontrib">
+
+ <!-- define antcontrib tasks -->
+ <taskdef uri="antlib:net.sf.antcontrib"
+ resource="net/sf/antcontrib/antlib.xml" />
+
+ <!-- define ant4eclipse tasks -->
+ <taskdef uri="antlib:org.ant4eclipse"
+ resource="org/ant4eclipse/ant/antlib.xml" />
+
+ <!--definition of directory properties -->
+ <property name="a4e.plugins.directory" value="plugins" />
+ <property name="a4e.features.directory" value="features" />
+ <property name="a4e.temp.directory" value="temp" />
+ <property name="a4e.self.directory" value="@dot" />
+
+ <!-- =================================
+ target: buildPlugin
+ ================================= -->
+ <macrodef name="buildPlugin" description="builds a single plug-in project.">
+ <attribute name="workspaceDirectory" />
+ <attribute name="projectName" />
+ <attribute name="targetPlatformId" />
+ <attribute name="destination" />
+ <attribute name="packageAsJar" default="true" />
+ <attribute name="buildSourceJar" default="true" />
+ <attribute name="defaultCompilerOptionsFile" default="" />
+ <attribute name="newBundleVersion" default="" />
+ <attribute name="clean" default="true" />
+
+ <!-- element definitions for lifecycle phases -->
+ <element name="validate"
+ optional="true"
+ description="Validate the project if it's correct and all necessary information is available." />
+ <element name="initialize"
+ optional="true"
+ description="Initialize build state, e.g. set properties or create directories." />
+ <element name="generate-sources"
+ optional="true"
+ description="Generate any source code for inclusion in compilation." />
+ <element name="generate-resources"
+ optional="true"
+ description="Generate resources for inclusion in the package." />
+ <element name="pre-compile"
+ optional="true"
+ description="Execute additional steps before compilation." />
+ <element name="post-compile"
+ optional="true"
+ description="Post-process the generated files from compilation, for example to do bytecode enhancement on Java classes." />
+ <element name="pre-package-library"
+ optional="true"
+ description="Execute additonal steps before packaging a library" />
+ <element name="post-package-library"
+ optional="true"
+ description="Execute additonal steps after packaging a library" />
+ <element name="prepare-package"
+ optional="true"
+ description="Copy the final package from the destination to aremote repository or whatever." />
+ <element name="deploy"
+ optional="true"
+ description="Perform any operations necessary to prepare a package before the actual packaging." />
+
+ <sequential>
+
+ <ant4eclipse:executePluginProject workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}"
+ prefix="buildPlugin">
+
+ <ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 1: Set the bundle version
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <condition property="buildPlugin.newBundleVersion"
+ value="${buildPlugin.bundle.resolved.version}"
+ else="@{newBundleVersion}">
+ <equals arg1="@{newBundleVersion}" arg2="" />
+ </condition>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 2: Validate
+ - Validate the project is correct and all necessary information is available.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- check project consistency -->
+ <ant4eclipse:checkPluginProject workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}" />
+
+ <!-- template element 'validate' -->
+ <validate />
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 3: Initialize
+ - Initialize build state, e.g. set properties or create directories.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- try to create the target directory -->
+ <mkdir dir="@{destination}" />
+
+ <!-- template element 'intialize' -->
+ <initialize />
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 4: Generate-sources
+ - Generate any source code for inclusion in compilation.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- template element 'generate-sources' -->
+ <generate-sources />
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 5: Generate-resources
+ - Generate resources for inclusion in the package.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- template element 'generate-resources' -->
+ <generate-resources />
+
+ </ant4eclipse:forProject>
+
+ </ant4eclipse:executePluginProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 6: Compile
+ - Compiles the plug-in project (only in case that the project has the nature 'org.eclipse.jdt.core.javanature').
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <antcontrib:if>
+ <ant4eclipse:hasNature workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}"
+ nature="org.eclipse.jdt.core.javanature" />
+ <antcontrib:then>
+
+ <!-- Execute the JDT project -->
+ <ant4eclipse:executeJdtProject workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}"
+ prefix="buildPlugin">
+
+ <jdtClasspathContainerArgument key="target.platform"
+ value="@{targetPlatformId}" />
+
+ <!-- Step 6.1: Clean all output directories -->
+ <ant4eclipse:forEachOutputDirectory if="@{clean}">
+ <scrub-directory dir="${buildPlugin.output.directory}" />
+ </ant4eclipse:forEachOutputDirectory>
+
+ <!-- Step 6.2: Compile the sources -->
+ <ant4eclipse:forProject filter="(buildPlugin.source.directories=*)">
+
+ <!-- template element 'pre-compile' -->
+ <pre-compile />
+
+ <echo>Compiling pde project '${buildPlugin.project.name}'</echo>
+ <echo> - source directories -> ${buildPlugin.source.directories}</echo>
+ <echo> - output directories -> ${buildPlugin.default.output.directory}</echo>
+ <echo> - bootclasspath -> ${buildPlugin.boot.classpath}</echo>
+ <echo> - classpath -> ${buildPlugin.classpath.absolute.compiletime}</echo>
+
+ <javac destdir="${buildPlugin.default.output.directory}"
+ compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter"
+ source="1.5"
+ target="1.5">
+
+ <src refid="buildPlugin.source.directories.path" />
+ <bootclasspath refid="buildPlugin.boot.classpath.path" />
+ <classpath refid="buildPlugin.classpath.absolute.compiletime.path" />
+
+ <!-- we have to pass in the reference to the additional compiler arguments -->
+ <compilerarg value="compiler.args.refid=buildPlugin.compiler.args"
+ compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter" />
+
+ <!-- we also have to pass path of the compiler options file to support project specific compiler options -->
+ <compilerarg value="compiler.options.file=${buildPlugin.project.directory}/.settings/org.eclipse.jdt.core.prefs"
+ compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter" />
+
+ <!-- pass the path of the default compiler options file -->
+ <compilerarg value="default.compiler.options.file=@{defaultCompilerOptionsFile}"
+ compiler="org.ant4eclipse.ant.jdt.ecj.JDTCompilerAdapter" />
+ </javac>
+
+ <!-- template element 'post-compile' -->
+ <post-compile />
+
+ </ant4eclipse:forProject>
+
+ <!-- Step 6.3: Copy the resources -->
+ <ant4eclipse:forEachSourceDirectory>
+ <echo>Copying resources from directory '${buildPlugin.source.directory}' to '${buildPlugin.output.directory}'</echo>
+ <copy todir="${buildPlugin.output.directory}">
+ <fileset dir="${buildPlugin.source.directory}"
+ includes="${buildPlugin.source.directory.includes}"
+ excludes="${buildPlugin.source.directory.excludes}">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </ant4eclipse:forEachSourceDirectory>
+
+ </ant4eclipse:executeJdtProject>
+ </antcontrib:then>
+ </antcontrib:if>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 7: Package the bundle
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:executePluginProject workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}"
+ prefix="buildPlugin">
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 7.1: Pack all libraries except the 'self' library
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forEachPluginLibrary filter="(buildPlugin.library.isSelf=false)">
+
+ <echo>Packing library '${buildPlugin.library.name}'</echo>
+
+ <!-- template element 'pre-package-library' -->
+ <pre-package-library />
+
+ <!-- copy the content of the library to a temporary folder -->
+ <ant4eclipse:executePluginLibrary workspace="@{workspaceDirectory}"
+ projectname="${buildPlugin.project.name}"
+ libraryname="${buildPlugin.library.name}">
+
+ <ant4eclipse:forEachOutputDirectory>
+ <echo>Copying resources from directory '${executePluginLibrary.output.directory}' to '@{destination}/${a4e.temp.directory}/${buildPlugin.library.name}'</echo>
+ <copy todir="@{destination}/${a4e.temp.directory}/${buildPlugin.library.name}" />
+ </ant4eclipse:forEachOutputDirectory>
+
+ <ant4eclipse:forEachSourceDirectory>
+ <echo>Copying resources from directory '${executePluginLibrary.source.directory}' to '@{destination}/${a4e.temp.directory}/${buildPlugin.library.name}'</echo>
+ <copy todir="@{destination}/${a4e.temp.directory}/${buildPlugin.library.name}"
+ overwrite="true">
+ <fileset dir="${executePluginLibrary.source.directory}"
+ includes="${executePluginLibrary.source.directory.includes}"
+ excludes="${executePluginLibrary.source.directory.excludes}">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </ant4eclipse:forEachSourceDirectory>
+
+ </ant4eclipse:executePluginLibrary>
+
+ <!--delete the library file if on exists -->
+ <delete file="@{destination}/${a4e.plugins.directory}/${buildPlugin.library.name}/${buildPlugin.library.name}"
+ quiet="true" />
+ <mkdir dir="@{destination}/${a4e.plugins.directory}/${buildPlugin.library.name}" />
+
+ <!-- jar the library file if on exists -->
+ <jar destfile="@{destination}/${a4e.plugins.directory}/${buildPlugin.library.name}/${buildPlugin.library.name}"
+ basedir="@{destination}/${a4e.temp.directory}/${buildPlugin.library.name}" />
+
+ <!-- move the jar file to the pde project folder project -->
+ <move file="@{destination}/${a4e.plugins.directory}/${buildPlugin.library.name}/${buildPlugin.library.name}"
+ todir="${buildPlugin.project.directory}" />
+
+ <!-- finally delete the temp file -->
+ <delete dir="@{destination}/${a4e.plugins.directory}/${buildPlugin.library.name}" />
+ <delete dir="@{destination}/${a4e.temp.directory}/" />
+
+ <!-- template element 'post-package-library' -->
+ <post-package-library />
+
+ </ant4eclipse:forEachPluginLibrary>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 7.2: Package the 'self' library
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forEachPluginLibrary filter="(buildPlugin.library.isSelf=true)">
+ <echo>Packing library '.'</echo>
+
+ <!-- template element 'pre-package-library' -->
+ <pre-package-library />
+
+ <!-- just copy everything to the 'self' directory -->
+ <ant4eclipse:executePluginLibrary workspaceDirectory="@{workspaceDirectory}"
+ projectname="${buildPlugin.project.name}"
+ libraryname="${buildPlugin.library.name}">
+
+ <ant4eclipse:forEachOutputDirectory>
+ <echo>Copying resources from directory '${executePluginLibrary.output.directory}' to '${buildPlugin.project.directory}/${a4e.self.directory}'</echo>
+ <copy todir="${buildPlugin.project.directory}/${a4e.self.directory}">
+ <fileset dir="${executePluginLibrary.output.directory}" />
+ </copy>
+ </ant4eclipse:forEachOutputDirectory>
+
+ <ant4eclipse:forEachSourceDirectory>
+ <echo>Copying resources from directory '${executePluginLibrary.source.directory}' to '${buildPlugin.project.directory}/${a4e.self.directory}'</echo>
+ <copy todir="${buildPlugin.project.directory}/${a4e.self.directory}">
+ <fileset dir="${executePluginLibrary.source.directory}"
+ includes="${executePluginLibrary.source.directory.includes}"
+ excludes="${executePluginLibrary.source.directory.excludes}">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </ant4eclipse:forEachSourceDirectory>
+
+ </ant4eclipse:executePluginLibrary>
+
+ <!-- template element 'post-package-library' -->
+ <post-package-library />
+
+ </ant4eclipse:forEachPluginLibrary>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 7.3: Package the bundle
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject>
+
+ <!-- template element 'prepare-package' -->
+ <prepare-package />
+
+ <!-- copy the (in the build.properties) specified content to the destination directory -->
+ <copy todir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}_${buildPlugin.newBundleVersion}"
+ overwrite="true">
+
+ <!-- file set defined by the projects build properties -->
+ <ant4eclipse:pdeProjectFileSet workspaceDirectory="@{workspaceDirectory}"
+ projectname="@{projectName}" />
+ </copy>
+
+ <!-- delete the (temporary) self-directory -->
+ <delete dir="${buildPlugin.project.directory}/${a4e.self.directory}"
+ quiet="true" />
+
+ <!-- 'patch' the manifest with the resolved bundle version -->
+ <manifest file="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}_${buildPlugin.newBundleVersion}/META-INF/MANIFEST.MF"
+ mode="update">
+ <attribute name="Bundle-Version"
+ value="${buildPlugin.newBundleVersion}" />
+ </manifest>
+ </ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - if bundle should be packaged as a jar file (the default),
+ - we have to jar the bundle.
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject if="@{packageAsJar}">
+ <jar destfile="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}_${buildPlugin.newBundleVersion}.jar"
+ basedir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}_${buildPlugin.newBundleVersion}"
+ manifest="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}_${buildPlugin.newBundleVersion}/META-INF/MANIFEST.MF" />
+ </ant4eclipse:forProject>
+
+ <ant4eclipse:forProject if="@{packageAsJar}">
+ <delete dir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}_${buildPlugin.newBundleVersion}"
+ quiet="true"
+ deleteonexit="true" />
+ </ant4eclipse:forProject>
+
+ <ant4eclipse:forProject>
+ <!-- template element 'deploy' -->
+ <deploy />
+ </ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 8: Build the source bundle
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject if="@{buildSourceJar}">
+ <buildSourceBundle workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}"
+ destination="@{destination}"
+ newBundleVersion="@{newBundleVersion}" />
+ </ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 9: Cleaning up
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject>
+ <!-- the property has been set, so we need to remove it otherwise it cannot be altered -->
+ <!-- by subsequent calls of this macro. -->
+ <antcontrib:var unset="true" name="buildPlugin.newBundleVersion" />
+ </ant4eclipse:forProject>
+
+ </ant4eclipse:executePluginProject>
+
+
+
+ </sequential>
+ </macrodef>
+
+ <!-- =================================
+ target: buildSourceBundle
+ Builds a source bundle for a given eclipse plug-in project.
+ ================================= -->
+ <macrodef name="buildSourceBundle"
+ description="builds a source bundle for a given plug-in project.">
+ <attribute name="workspaceDirectory" />
+ <attribute name="projectName" />
+ <attribute name="destination" />
+ <attribute name="newBundleVersion" default="" />
+ <sequential>
+
+ <ant4eclipse:executePluginProject workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}"
+ prefix="buildPlugin">
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 1: Set the bundle version
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject>
+ <condition property="buildPlugin.newBundleVersion"
+ value="@{newBundleVersion}"
+ else="${buildPlugin.bundle.resolved.version}">
+ <isset property="@{newBundleVersion}" />
+ </condition>
+ </ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 2: Copy the source of the 'self' library to the
+ - destination location
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forEachPluginLibrary filter="(buildPlugin.library.isSelf=true)">
+
+ <ant4eclipse:executePluginLibrary workspaceDirectory="@{workspaceDirectory}"
+ projectname="${buildPlugin.project.name}"
+ libraryname="${buildPlugin.library.name}">
+
+ <ant4eclipse:forEachSourceDirectory>
+ <copy todir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}/">
+ <fileset dir="${executePluginLibrary.source.directory}"
+ includes="${executePluginLibrary.source.directory.includes}"
+ excludes="${executePluginLibrary.source.directory.excludes}" />
+ </copy>
+ </ant4eclipse:forEachSourceDirectory>
+
+ </ant4eclipse:executePluginLibrary>
+ </ant4eclipse:forEachPluginLibrary>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 3: Package the source of all the library source (except
+ - the 'self' library ) to the destination location
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forEachPluginLibrary filter="(buildPlugin.library.isSelf=false)">
+
+ <ant4eclipse:executePluginLibrary workspaceDirectory="@{workspaceDirectory}"
+ projectname="${buildPlugin.project.name}"
+ libraryname="${buildPlugin.library.name}">
+
+ <ant4eclipse:forEachSourceDirectory>
+ <copy todir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}/${buildPlugin.library.name}.src">
+ <fileset dir="${executePluginLibrary.source.directory}"
+ includes="${executePluginLibrary.source.directory.includes}"
+ excludes="${executePluginLibrary.source.directory.excludes}" />
+ </copy>
+ </ant4eclipse:forEachSourceDirectory>
+
+ </ant4eclipse:executePluginLibrary>
+ </ant4eclipse:forEachPluginLibrary>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 4: Copy all 'non-library' resources to the destination
+ - location and create the manifest file
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject>
+
+ <!-- copy the (in the build.properties) specified content to the destination directory -->
+ <copy todir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}"
+ overwrite="true">
+
+ <!-- file set defined by the projects build properties -->
+ <ant4eclipse:pdeProjectFileSet workspaceDirectory="@{workspaceDirectory}"
+ projectname="@{projectName}"
+ excludeLibraries="true"
+ sourceBundle="true" />
+ </copy>
+
+ <mkdir dir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}/META-INF" />
+
+ <!-- create the bundle manifest -->
+ <manifest file="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}/META-INF/MANIFEST.MF">
+ <attribute name="Bundle-ManifestVersion" value="2" />
+ <attribute name="Bundle-Version"
+ value="${buildPlugin.newBundleVersion}" />
+ <attribute name="Bundle-SymbolicName"
+ value="${buildPlugin.bundle.symbolicname}.source" />
+ <attribute name="Eclipse-SourceBundle"
+ value="${buildPlugin.bundle.symbolicname};version="${buildPlugin.newBundleVersion}";roots:="${buildPlugin.build.librarysourceroots}"" />
+ </manifest>
+
+ </ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 5: create the jar file
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject>
+ <jar destfile="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}.jar"
+ basedir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}"
+ manifest="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}/META-INF/MANIFEST.MF" />
+ </ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 6: delete the (temporary) bundle directory
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject>
+ <delete dir="@{destination}/${a4e.plugins.directory}/${buildPlugin.bundle.symbolicname}.source_${buildPlugin.newBundleVersion}"
+ quiet="true"
+ deleteonexit="true" />
+ </ant4eclipse:forProject>
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - Step 7: Cleaning up
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <ant4eclipse:forProject>
+ <!-- the property has been set, so we need to remove it otherwise it cannot be altered -->
+ <!-- by subsequent calls of this macro. -->
+ <antcontrib:var unset="true" name="buildPlugin.newBundleVersion" />
+ </ant4eclipse:forProject>
+
+ </ant4eclipse:executePluginProject>
+
+ </sequential>
+ </macrodef>
+
+ <!-- ~~~ PRIVATE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- Clears a directory under a certain condition. -->
+ <!-- -->
+ <!-- @param dir The directory which has to be cleaned. -->
+ <!-- @param condition The condition which decides whether the cleanup takes place or not. -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <macrodef name="scrub-directory">
+ <attribute name="dir" />
+ <attribute name="condition" default="true" />
+ <sequential>
+ <antcontrib:if>
+ <antcontrib:istrue value="@{condition}" />
+ <antcontrib:then>
+ <echo>Scrubbing directory '@{dir}'</echo>
+ <delete dir="@{dir}" quiet="true" />
+ <mkdir dir="@{dir}" />
+ </antcontrib:then>
+ </antcontrib:if>
+ </sequential>
+ </macrodef>
+
+ <!-- =================================
+ macro : buildProduct
+ description : Builds an eclipse product. Each contained plug-in project will be build.
+ ================================= -->
+ <macrodef name="buildProduct">
+
+ <attribute name="workspaceDirectory" />
+ <attribute name="productfile" />
+ <attribute name="targetPlatformId" />
+ <attribute name="destination" />
+ <attribute name="os" default="win32" />
+ <attribute name="clearDestination" default="false" />
+ <attribute name="defaultCompilerOptionsFile" default="" />
+ <attribute name="packageAsJar" default="false" />
+ <attribute name="commandline" default="false" />
+ <attribute name="packageSources" default="true" />
+
+ <!-- element definitions for lifecycle phases -->
+ <element name="validate"
+ optional="true"
+ description="Validate the project if it's correct and all necessary information is available. Scope: forProduct." />
+
+ <element name="deploy"
+ optional="true"
+ description="Perform any operations necessary to prepare a package before the actual packaging. Scope: forProduct." />
+
+ <sequential>
+
+ <ant4eclipse:executeProduct workspaceDirectory="@{workspaceDirectory}"
+ targetPlatformId="@{targetPlatformId}"
+ product="@{productfile}"
+ os="@{os}">
+
+ <ant4eclipse:forProduct>
+ <echo>Building product ${executeProduct.product.name} version ${executeProduct.product.version}</echo>
+ </ant4eclipse:forProduct>
+
+ <ant4eclipse:forProduct>
+ <validate />
+ </ant4eclipse:forProduct>
+
+ <!-- Step 1: Scrub destination directory if requested -->
+ <ant4eclipse:forProduct if="@{clearDestination}">
+ <echo>Scrubbing directory '@{destination}'</echo>
+ <delete dir="@{destination}" quiet="true" />
+ </ant4eclipse:forProduct>
+
+ <!-- Step 2: Assure a necessary structure. -->
+ <ant4eclipse:forProduct>
+ <mkdir dir="@{destination}/configuration" />
+ </ant4eclipse:forProduct>
+
+ <!-- Step 3: Build features or plugins -->
+
+ <!-- Step 3a: Build included features if this product is based on features -->
+ <ant4eclipse:forEachFeature>
+ <antcontrib:if>
+ <istrue value="${executeProduct.product.basedonfeatures}" />
+ <then>
+ <echo> -> Building included feature '${executeProduct.feature.id}' - '${executeProduct.feature.version}'</echo>
+ <buildFeature workspaceDirectory="@{workspaceDirectory}"
+ featureId="${executeProduct.feature.id}"
+ featureVersion="${executeProduct.feature.version}"
+ targetPlatformId="@{targetPlatformId}"
+ destination="@{destination}"
+ packageAsJar="@{packageAsJar}"
+ packagePluginsAsJar="@{packageAsJar}"
+ packagePluginSourcesAsJar="@{packageSources}"
+ defaultCompilerOptionsFile="@{defaultCompilerOptionsFile}" />
+ </then>
+ </antcontrib:if>
+ </ant4eclipse:forEachFeature>
+
+ <!-- Step 3b: Build included plugins if this product is based on plugins -->
+ <ant4eclipse:forEachPlugin filter="(executeProduct.plugin.isSource=true)">
+ <antcontrib:if>
+ <isfalse value="${executeProduct.product.basedonfeatures}" />
+ <then>
+ <echo> -> Building included plugin '${executeProduct.plugin.id}' from project: ${executeProduct.plugin.projectName}</echo>
+ <buildPlugin projectName="${executeProduct.plugin.projectName}"
+ workspaceDirectory="@{workspaceDirectory}"
+ targetPlatformId="@{targetPlatformId}"
+ packageAsJar="@{packageAsJar}"
+ destination="@{destination}"
+ defaultCompilerOptionsFile="@{defaultCompilerOptionsFile}"
+ buildSourceJar="@{packageSources}" />
+ </then>
+ </antcontrib:if>
+ </ant4eclipse:forEachPlugin>
+
+ <!-- Step 3c: Copy plugins from the target platform -->
+ <ant4eclipse:forEachPlugin filter="(executeProduct.plugin.isSource=false)">
+ <antcontrib:if>
+ <isfalse value="${executeProduct.product.basedonfeatures}" />
+ <then>
+ <echo>Copying bundle '${executeProduct.plugin.file} (${executeProduct.plugin.id})' </echo>
+ <copy todir="@{destination}/${a4e.plugins.directory}">
+ <filelist refid="executeProduct.plugin.filelist" />
+ </copy>
+ </then>
+ </antcontrib:if>
+ </ant4eclipse:forEachPlugin>
+
+ <!-- Step 4: Generate artifacts -->
+ <ant4eclipse:forProduct>
+
+ <!-- create the .eclipseproduct file -->
+ <echo file="@{destination}/.eclipseproduct">version=1.0.0
</echo>
+ <echo file="@{destination}/.eclipseproduct" append="true">name=${executeProduct.product.name}
</echo>
+ <echo file="@{destination}/.eclipseproduct" append="true">id=${executeProduct.product.id}
</echo>
+
+ <!-- create the ini file for the launcher -->
+ <antcontrib:if>
+ <equals arg1="" arg2="${executeProduct.product.vmargs}" />
+ <then>
+ <!-- no arguments to set -->
+ <echo file="@{destination}/${executeProduct.product.launchername}.ini">
+ </echo>
+ </then>
+ <else>
+ <!-- set vm arguments -->
+ <echo file="@{destination}/${executeProduct.product.launchername}.ini">-vmargs
</echo>
+ <antcontrib:for param="vmarg"
+ list="${executeProduct.product.vmargs}"
+ delimiter=" "
+ trim="true">
+ <sequential>
+ <echo file="@{destination}/${executeProduct.product.launchername}.ini"
+ append="true">@{vmarg}
</echo>
+ </sequential>
+ </antcontrib:for>
+ </else>
+ </antcontrib:if>
+
+ <antcontrib:if>
+ <and>
+ <not>
+ <equals arg1="" arg2="${executeProduct.product.configini}" />
+ </not>
+ <available file="${executeProduct.product.configini}"
+ type="file" />
+ </and>
+ <then>
+ <!-- copy the config.ini provided by the product configuration. -->
+ <copy file="${executeProduct.product.configini}"
+ todir="@{destination}/configuration"
+ overwrite="true" />
+ </then>
+ <else>
+
+ <!-- generate a default config.ini which just starts the workbench. -->
+ <echo file="@{destination}/configuration/config.ini"
+ append="false"># Product Runtime Configuration File${line.separator}</echo>
+ <echo file="@{destination}/configuration/config.ini"
+ append="true">eclipse.application=${executeProduct.product.applicationid}${line.separator}</echo>
+ <echo file="@{destination}/configuration/config.ini"
+ append="true">osgi.bundles.defaultStartLevel=4${line.separator}</echo>
+ <echo file="@{destination}/configuration/config.ini"
+ append="true">eclipse.product=${executeProduct.product.id}${line.separator}</echo>
+ <echo file="@{destination}/configuration/config.ini"
+ append="true">osgi.splashPath=platform:/base/plugins/org.eclipse.platform${line.separator}</echo>
+ <echo file="@{destination}/configuration/config.ini"
+ append="true">osgi.bundles=${executeProduct.osgi.bundles}${line.separator}</echo>
+
+ </else>
+ </antcontrib:if>
+
+ <antcontrib:if>
+ <istrue value="@{commandline}" />
+ <then>
+ <copy file="${executeProduct.product.cmdexe}"
+ tofile="@{destination}/${executeProduct.product.launchername}.exe"
+ overwrite="true" />
+ </then>
+ <else>
+ <copy file="${executeProduct.product.guiexe}"
+ tofile="@{destination}/${executeProduct.product.launchername}.exe"
+ overwrite="true" />
+ <copy file="${executeProduct.product.cmdexe}"
+ tofile="@{destination}/${executeProduct.product.launchername}c.exe"
+ overwrite="true" />
+ </else>
+ </antcontrib:if>
+
+ </ant4eclipse:forProduct>
+
+ <ant4eclipse:forProduct>
+ <!-- template element 'deploy' -->
+ <deploy />
+ </ant4eclipse:forProduct>
+
+ <ant4eclipse:forProduct>
+ <echo>Building product ${executeProduct.product.name} successfully build.</echo>
+ </ant4eclipse:forProduct>
+
+ </ant4eclipse:executeProduct>
+
+ </sequential>
+
+ </macrodef>
+
+ <!-- =================================
+ target : buildFeature
+ description : Builds an eclipse feature project. Each contained plug-in project will be build.
+ ================================= -->
+ <macrodef name="buildFeature">
+
+ <attribute name="workspaceDirectory" />
+ <attribute name="projectName" default="" />
+ <attribute name="featureId" default="" />
+ <attribute name="featureVersion" default="" />
+ <attribute name="targetPlatformId" />
+ <attribute name="destination" />
+ <attribute name="clearDestination" default="false" />
+ <attribute name="skipBuildFeature" default="false" />
+ <attribute name="packageAsJar" default="true" />
+ <attribute name="packagePluginsAsJar" default="true" />
+ <attribute name="packagePluginSourcesAsJar" default="true" />
+ <attribute name="defaultCompilerOptionsFile" default="" />
+ <attribute name="cleanPluginBuild" default="true" />
+ <sequential>
+
+ <!-- executes the defined feature -->
+ <ant4eclipse:executeFeature workspaceDirectory="@{workspaceDirectory}"
+ projectName="@{projectName}"
+ featureId="@{featureId}"
+ featureVersion="@{featureVersion}"
+ targetPlatformId="@{targetPlatformId}">
+
+ <ant4eclipse:forRootFeature>
+ <echo>Building feature '${executeFeature.feature.id}_${executeFeature.feature.version}'</echo>
+ <echo> - feature.isSource: '${executeFeature.feature.isSource}'</echo>
+ </ant4eclipse:forRootFeature>
+
+ <!-- Step 1: Scrub destination directory -->
+ <ant4eclipse:forRootFeature if="@{clearDestination}">
+ <echo>Scrubbing directory '@{destination}'</echo>
+ <delete dir="@{destination}" quiet="true" />
+ <mkdir dir="@{destination}" />
+ </ant4eclipse:forRootFeature>
+
+ <!-- Step 2: Build included features -->
+ <ant4eclipse:forEachIncludedFeature>
+ <echo> -> Building included feature '${executeFeature.feature.id}'</echo>
+ <buildFeature workspaceDirectory="@{workspaceDirectory}"
+ featureId="${executeFeature.feature.id}"
+ featureVersion="${executeFeature.feature.resolved.version}"
+ targetPlatformId="@{targetPlatformId}"
+ destination="@{destination}"
+ packageAsJar="@{packageAsJar}" />
+ </ant4eclipse:forEachIncludedFeature>
+
+ <!-- Step 3: Build the plug-ins -->
+ <!-- Step 3.1: Build the plug-ins -->
+ <ant4eclipse:forEachPlugin filter="(executeFeature.plugin.isSource=true)">
+ <echo>Building plug-in project '${executeFeature.plugin.filename} (${executeFeature.plugin.id}_${executeFeature.plugin.resolved.version})' </echo>
+ <buildPlugin workspaceDirectory="@{workspaceDirectory}"
+ projectName="${executeFeature.plugin.filename}"
+ targetplatformid="@{targetPlatformId}"
+ destination="@{destination}"
+ packageAsJar="@{packagePluginsAsJar}"
+ buildSourceJar="@{packagePluginSourcesAsJar}"
+ defaultCompilerOptionsFile="@{defaultCompilerOptionsFile}"
+ clean="@{cleanPluginBuild}" />
+ </ant4eclipse:forEachPlugin>
+
+ <!-- Step 3.2: Copy plug-ins -->
+ <ant4eclipse:forEachPlugin filter="(executeFeature.plugin.isSource=false)">
+ <echo>Copying bundle '${executeFeature.plugin.file} (${executeFeature.plugin.id}_${executeFeature.plugin.resolved.version})' </echo>
+ <copy todir="@{destination}/${a4e.plugins.directory}">
+ <filelist refid="executeFeature.plugin.filelist" />
+ </copy>
+ </ant4eclipse:forEachPlugin>
+
+ <!-- Step 4: Build feature itself -->
+ <ant4eclipse:forRootFeature unless="@{skipBuildFeature}"
+ filter="(executeFeature.feature.isSource=true)">
+
+ <echo>Building feature project '${executeFeature.feature.file.name} (${executeFeature.feature.id}_${executeFeature.feature.resolved.version})' </echo>
+
+ <!-- Step 4.1: Copy all files defined in the build.properties to the destination directory -->
+ <copy todir="@{destination}/${a4e.features.directory}/${executeFeature.feature.id}_${executeFeature.feature.resolved.version}"
+ overwrite="true">
+
+ <!-- file set defined by the projects build properties -->
+ <ant4eclipse:pdeProjectFileSet workspaceDirectory="@{workspaceDirectory}"
+ projectname="${executeFeature.feature.file.name}" />
+ </copy>
+
+ <!-- Step 4.2: Patch the feature.xml -->
+ <ant4eclipse:patchFeatureManifest featureXmlFile="@{destination}/features/${executeFeature.feature.id}_${executeFeature.feature.resolved.version}/feature.xml"
+ pluginVersions="${executeFeature.feature.plugins.resolved.versions}" />
+
+ <!-- Step 4.3: Package the feature as a jar -->
+ <!-- skip this step if 'packageAsJar' is 'false' -->
+ <antcontrib:if>
+ <istrue value="@{packageAsJar}" />
+ <antcontrib:then>
+
+ <!-- jar the feature -->
+ <jar destfile="@{destination}/${a4e.features.directory}/${executeFeature.feature.id}_${executeFeature.feature.resolved.version}.jar"
+ basedir="@{destination}/${a4e.features.directory}/${executeFeature.feature.id}_${executeFeature.feature.resolved.version}" />
+
+ <!-- delete the base directory -->
+ <delete dir="@{destination}/${a4e.features.directory}/${executeFeature.feature.id}_${executeFeature.feature.resolved.version}" />
+ </antcontrib:then>
+ </antcontrib:if>
+
+ </ant4eclipse:forRootFeature>
+
+ <!-- if feature is already built, we only have to copy the jar / directory -->
+ <ant4eclipse:forRootFeature unless="@{skipBuildFeature}"
+ filter="(executeFeature.feature.isSource=false)">
+
+ <echo>Copying feature '${executeFeature.feature.file} (${executeFeature.feature.id}_${executeFeature.feature.resolved.version})' </echo>
+
+ <copy todir="@{destination}/${a4e.features.directory}">
+ <filelist refid="executeFeature.feature.filelist" />
+ </copy>
+
+ </ant4eclipse:forRootFeature>
+
+ <ant4eclipse:forRootFeature>
+ <echo>Feature '${executeFeature.feature.id}_${executeFeature.feature.version}' successfully built.</echo>
+ </ant4eclipse:forRootFeature>
+
+ </ant4eclipse:executeFeature>
+
+ </sequential>
+ </macrodef>
+
+</project>
\ No newline at end of file
Property changes on: trunk/rtmtools/lib/a4e-2137/macros/a4e-pde-macros.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/rtmtools/lib/a4e-2137/macros/a4e-platform-macros.xml
===================================================================
--- trunk/rtmtools/lib/a4e-2137/macros/a4e-platform-macros.xml (rev 0)
+++ trunk/rtmtools/lib/a4e-2137/macros/a4e-platform-macros.xml 2016-03-10 03:37:28 UTC (rev 581)
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<project name="build"
+ basedir="."
+ xmlns:ant4eclipse="antlib:org.ant4eclipse"
+ xmlns:antcontrib="antlib:net.sf.antcontrib">
+
+ <taskdef uri="antlib:net.sf.antcontrib"
+ resource="net/sf/antcontrib/antlib.xml" />
+
+ <taskdef uri="antlib:org.ant4eclipse"
+ resource="org/ant4eclipse/antlib.xml" />
+
+ <!-- =================================
+ target: cvsGetProjectSet
+ ================================= -->
+ <macrodef name="cvsGetProjectSet">
+ <attribute name="workspace" />
+ <attribute name="projectset" />
+ <attribute name="cvsUser" />
+ <attribute name="cvsPwd" />
+ <attribute name="command" />
+
+ <sequential>
+
+
+ </sequential>
+ </macrodef>
+
+</project>
\ No newline at end of file
Property changes on: trunk/rtmtools/lib/a4e-2137/macros/a4e-platform-macros.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/rtmtools/lib/a4e-2137/version.txt
===================================================================
--- trunk/rtmtools/lib/a4e-2137/version.txt (rev 0)
+++ trunk/rtmtools/lib/a4e-2137/version.txt 2016-03-10 03:37:28 UTC (rev 581)
@@ -0,0 +1 @@
+1.0.0.M4
\ No newline at end of file
Property changes on: trunk/rtmtools/lib/a4e-2137/version.txt
___________________________________________________________________
Added: svn:mime-type
+ text/plain
More information about the openrtm-commit
mailing list