1. tbrugz
  2. kmlutils

Commits

tbrugz  committed 22044a1

build: added resolve & publish tasks (with ivy) ; version = 0.5.0

  • Participants
  • Parent commits 208e96a
  • Branches default
  • Tags v0.5.0

Comments (0)

Files changed (5)

File .hgignore

View file
  • Ignore whitespace
 glob:bin/*
+glob:lib/*
+glob:dist/*
 glob:work/output/*
-glob:dist/*
 glob:work/input/tmp/*
 glob:work/tmp/*

File build.properties

View file
  • Ignore whitespace
+version=0.5.0

File build.xml

View file
  • Ignore whitespace
-<project name="kmlutils" default="dist">
+<project name="kmlutils" default="dist" xmlns:ivy="antlib:org.apache.ivy.ant">
 
 	<!--
 	for debugging:
 	http://ant.apache.org/problems.html
 	-->
 	
+	<property file="build.properties"/>
+	<property file="ivysettings.properties"/>
+	
 	<path id="compile">
 		<pathelement location="lib/commons-logging-1.1.1.jar"/>
 		<pathelement location="lib/log4j-1.2.15.jar"/>
 			<fileset dir="work/output" includes="**/*.kml" />
 		</schemavalidate>
 	</target>
+
+	<target name="config-ivy" if="ivy.settings.dir">
+		<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
+	</target>	
 	
+	<target name="resolve-ivy" depends="config-ivy" description="retrieve dependencies with ivy">
+		<ivy:retrieve />
+	</target>	
+
+	<target name="publish" depends="dist,config-ivy" description="publish this project in the ivy repository">
+		<property name="revision" value="${version}"/>
+		<ivy:info/>
+		<echo message="ivy.settings.dir: ${ivy.settings.dir}"/>
+		<ivy:publish resolver="local" pubrevision="${revision}" status="release" update="true" overwrite="true">
+			<artifacts pattern="dist/[module].[ext]" />
+		</ivy:publish>
+		<echo message="project ${ant.project.name} released with version ${revision}"/>
+	</target>
+
 </project>

File ivy.xml

View file
  • Ignore whitespace
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+	<info organisation="org.bitbucket.tbrugz" module="kmlutils"/>
+	<configurations>
+		<conf name="main"/>
+	</configurations>
+	<publications>
+		<artifact name="kmlutils" type="jar"/>
+	</publications>
+	<dependencies>
+		<dependency org="commons-logging" name="commons-logging" rev="1.1.1"/>
+	</dependencies>
+</ivy-module>

File ivysettings.template.properties

View file
  • Ignore whitespace
+ivy.settings.dir=/home/tbrugz/proj/sqldump
+local.repository.dir=/home/tbrugz/proj/ivy-repo