blob: 49d589e71b6b764d973a95b6e3612eecaef6f730 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is to use Ant to run XSL Transform on on aggrcon files.
Its use for when a rebuild is needed, and as input, we want to
take everyone's previous output, to minimize risk of changes
being introduced, that we don't know about. So we leave aggrcon files
as they were, but change only the repository 'location' attribute.
As it currently is, it runs from in the workspace, where
the 'tools' project is peer of the 'build' project.
The new files (for now) are put in the newFiles directory.
Once confidence is gained, could add some more Ant to copy
newFiles over those in build project.
-->
<project
default="main"
basedir=".">
<target
name="main"
depends="init, transformFiles, copyFiles">
<echo message="Transformed aggrcon files and copied them back to build project" />
</target>
<target
name="copyFiles"
depends="init, transformFiles">
<available
file="${outputDirectory}"
type="dir"
property="outputExists" />
<fail
unless="outputExists"
message="ERROR: output directory did not exist: ${outputDirectory}" />
<copy
overwrite="true" failonerror="true"
todir="${inputDirectory}">
<fileset
dir="${outputDirectory}"
includes="*.aggrcon" />
</copy>
<delete dir="${outputDirectory}">
</delete>
</target>
<target
name="init"
unless="initialized">
<property
name="inputDirectory"
value="${basedir}/../../org.eclipse.simrel.build" />
<property
name="outputDirectory"
value="${basedir}/newFiles" />
<property
name="initialized"
value="true" />
</target>
<target
name="transformFiles"
depends="init">
<!--
Change the value of this property, or pass in on -D variable, to
specify the "common repository" for all contributions to use.
-->
<property
name="newRepository"
value="https://download.eclipse.org/releases/neon/201609281000/" />
<echo message="calling the XSLT Ant task" />
<echo message=" transforming files in ${inputDirectory}" />
<echo message=" writing them to ${outputDirectory}" />
<echo message=" newRepository ${newRepository}" />
<available
file="${inputDirectory}"
type="dir"
property="inputExists" />
<fail
unless="inputExists"
message="ERROR: input directory did not exist: ${inputDirectory}" />
<xslt
basedir="${inputDirectory}"
destdir="${outputDirectory}"
style="changeAllRepos.xsl"
includes="*.aggrcon"
extension=".aggrcon"
force="true">
<param
name="newRepository"
expression="${newRepository}" />
</xslt>
</target>
</project>