Skip to content

Instantly share code, notes, and snippets.

@aembleton aembleton/
Last active Dec 25, 2015

What would you like to do?
Builds a jar
#Sat, 12 Oct 2013 23:12:10 +0100
<project name="ScrapeRequest" basedir="." default="jar">
<property name="build" value="build"/>
<property file="" prefix="info"/>
<target name="clean">
<delete dir="${build}"/>
<target name="init" depends="clean">
<mkdir dir="${build}"/>
<target name="compile" depends="init">
<!-- Compile the java code -->
<javac srcdir="src" destdir="${build}" />
<target name="incrementBuild">
<propertyfile file="">
<entry key="build" operation="+" value="1" type="int"/>
<target name="buildJar" depends="compile,incrementBuild">
<!-- Build the jar file -->
<jar basedir="${build}" destfile="ScrapeRequest-${info.major}.${info.minor}.${}.jar"/>
<target name="jar" depends="buildJar">
<!-- jar has been built, now just remove the build directory so that it doesn't pollute the dev environment -->
<delete dir="${build}"/>

This comment has been minimized.

Copy link
Owner Author

aembleton commented Oct 14, 2013

Without the type="int", a 1 gets appended to the end of the value, so you end up with 01111... etc. The int forces it to actually increment the value as a number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.