<project name="landsat" default="build" basedir=".">

	<!-- point to your JOSM directory -->
	<property name="josm" location="../../../../editors/josm/dist/josm-custom.jar" 
/>



	<target name="init">
		<mkdir dir="build"></mkdir>
		<mkdir dir="dist"></mkdir>
	</target>

	<target name="compile" depends="init">
		<javac srcdir="src" classpath="${josm}" debug="true" destdir="build">
			<include name="**/*.java" />
		</javac>
	</target>

	<target name="build" depends="compile">
		<copy todir="build/images" >
			<fileset dir="images" />
		</copy>
		<jar destfile="dist/landsat.jar" basedir="build">
			<manifest>
				<attribute name="Plugin-Class" value="landsat.LandsatPlugin" />
				<attribute name="Plugin-Description" value="Provide a background layer that displays bitmaps downloaded from&lt;br&gt;a WMS Server, e.g. the Landsat pictures. Beware, that these&lt;br&gt;bitmaps can be off by up to 150 metres" />
			</manifest>
		</jar>
	</target>

	<target name="clean">
		<delete dir="build" />
		<delete dir="dist" />
	</target>

	<target name="install" depends="build">
		<copy file="dist/landsat.jar" todir="${user.home}/.josm/plugins"/>
	</target>

</project>
