Permalink
Browse files

adding ant task that will download the tools jar even when run from c…

…ommandline maven
  • Loading branch information...
1 parent 7c79890 commit e37224c007f23be35ee6fd0629f6d5513473af4c @moovida committed Apr 20, 2012
Showing with 44 additions and 1 deletion.
  1. +29 −1 plugins/net.refractions.udig.libs/pom-libs.xml
  2. +15 −0 plugins/net.refractions.udig.libs/tools_jar.xml
@@ -837,7 +837,35 @@
</execution>
</executions>
</plugin>
-
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>1.0b3</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>checktools</id>
+ <phase>compile</phase>
+ <configuration>
+ <tasks>
+ <ant antfile="tools_jar.xml" dir="${basedir}" target="tools"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project basedir="." default="tools">
+ <target name="check-tools">
+ <available file="${basedir}${file.separator}tools_1.6.0_25.jar" property="tools.present"/>
+ </target>
+
+ <target
+ name="tools"
+ description="load the tools jar if needed"
+ depends="check-tools" unless="tools.present">
+ <!-- compiler needed for omsbox, needs to be in the plugins folder, but *NOT* on the classpath -->
+ <get src="http://udig.refractions.net/files/downloads/jre/tools_1.6.0_25.jar" dest="${basedir}${file.separator}tools_1.6.0_25.jar"/>
+ </target>
+</project>

0 comments on commit e37224c

Please sign in to comment.