<?xml version="1.0" encoding="utf-8" ?>
<project name="Osmosis.Core" default="all" basedir=".">
<!-- Include common java build. -->
<property name="build-support.dir" location="../build-support"/>
<import file="${build-support.dir}/script/build-java.xml"/>
<!-- Override the normal build to perform some pre-compilation steps. -->
<target name="build" depends="init, _update_version, _build"/>
<target name="_update_version" description="Modifies some source code files to include the project version.">
<!-- Update the version number in the main class. -->
<copy file="src/org/openstreetmap/osmosis/core/OsmosisConstants.java.template"
tofile="src/org/openstreetmap/osmosis/core/OsmosisConstants.java"/>
<replaceregexp
byline="true"
file="src/org/openstreetmap/osmosis/core/OsmosisConstants.java"
match="String VERSION = "(.*)""
replace="String VERSION = "${project.version}""
/>
<!-- Update the version number in the plugin descriptor. -->
<copy file="src/org/openstreetmap/osmosis/core/plugin/plugin.xml.template"
tofile="src/org/openstreetmap/osmosis/core/plugin/plugin.xml"/>
<replaceregexp
byline="true"
file="src/org/openstreetmap/osmosis/core/plugin/plugin.xml"
match="id="org.openstreetmap.osmosis.core.plugin.Core" version="(.*)""
replace="id="org.openstreetmap.osmosis.core.plugin.Core" version="${project.version}""
/>
</target>
</project>