Sorted out a way to get Maven to reference a local jar file without rendering

the pom file hosed for transitive dependencies.
This commit is contained in:
Michael Bayne
2010-11-18 15:54:42 +00:00
parent d999592401
commit 6f1a6ce78d
6 changed files with 58 additions and 23 deletions
+13 -1
View File
@@ -34,7 +34,7 @@
<taskdef resource="proguard/ant/task.properties" classpath="${proguard}"/> <taskdef resource="proguard/ant/task.properties" classpath="${proguard}"/>
<proguard> <proguard>
<injar path="target/getdown-${maven.version}.jar"/> <injar path="target/getdown-${maven.version}.jar"/>
<injar path="lib/jRegistryKey.jar" filter="!META-INF/**"/> <injar path="lib/jregistrykey/jregistrykey/1.0/jregistrykey-1.0..jar" filter="!META-INF/**"/>
<injar path="${samskivert}" filter="!META-INF/**,!**/Log4JLogger*, <injar path="${samskivert}" filter="!META-INF/**,!**/Log4JLogger*,
!**/*.java,com/samskivert/Log.class,**/samskivert/io/**,**/samskivert/swing/**, !**/*.java,com/samskivert/Log.class,**/samskivert/io/**,**/samskivert/swing/**,
**/samskivert/text/**,**/samskivert/util/**"/> **/samskivert/text/**,**/samskivert/util/**"/>
@@ -48,6 +48,18 @@
<keep name="com.threerings.getdown.launcher.GetdownApp"> <keep name="com.threerings.getdown.launcher.GetdownApp">
<method access="static" name="main"/> <method access="static" name="main"/>
</keep> </keep>
<keep name="com.threerings.getdown.data.Resource">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.net.Downloader">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.net.Downloader$Observer">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.net.HTTPDownloader">
<constructor/><method name="*"/><field access="public" name="*"/>
</keep>
<keep name="com.threerings.getdown.tools.Differ"> <keep name="com.threerings.getdown.tools.Differ">
<method access="static" name="main"/> <method access="static" name="main"/>
</keep> </keep>
+1 -1
View File
@@ -6,7 +6,7 @@
-basedirectory ../ -basedirectory ../
-injars dist/getdown.jar(!**/tools/DigesterTask*) -injars dist/getdown.jar(!**/tools/DigesterTask*)
-injars dist/lib/jRegistryKey.jar(!META-INF/*) -injars dist/lib/jregistrykey/jregistrykey/1.0/jregistrykey-1.0.jar(!META-INF/*)
-injars dist/lib/samskivert.jar( -injars dist/lib/samskivert.jar(
com/samskivert/Log.class,**/io/**,**/swing/**,**/net/**,**/text/**,**/util/**) com/samskivert/Log.class,**/io/**,**/swing/**,**/net/**,**/text/**,**/util/**)
-injars dist/lib/commons-codec.jar(!META-INF/*) -injars dist/lib/commons-codec.jar(!META-INF/*)
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>jregistrykey</groupId>
<artifactId>jregistrykey</artifactId>
<version>1.0</version>
<description>POM was created from install:install-file</description>
</project>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>jregistrykey</groupId>
<artifactId>jregistrykey</artifactId>
<version>1.0</version>
<versioning>
<versions>
<version>1.0</version>
</versions>
<lastUpdated>20101118155146</lastUpdated>
</versioning>
</metadata>
+23 -21
View File
@@ -40,6 +40,13 @@
<url>http://getdown.googlecode.com/svn/trunk/</url> <url>http://getdown.googlecode.com/svn/trunk/</url>
</scm> </scm>
<repositories>
<repository>
<id>lib-repo</id>
<url>file://${basedir}/lib</url>
</repository>
</repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>net.sf.proguard</groupId> <groupId>net.sf.proguard</groupId>
@@ -62,19 +69,19 @@
<scope>compile</scope> <scope>compile</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>jregistrykey</groupId>
<artifactId>jregistrykey</artifactId>
<version>1.0</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.apache.ant</groupId> <groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId> <artifactId>ant</artifactId>
<version>1.7.1</version> <version>1.7.1</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>jregistrykey</groupId>
<artifactId>jregistrykey</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/jRegistryKey.jar</systemPath>
</dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
@@ -88,7 +95,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>RELEASE</version> <version>2.3.2</version>
<configuration> <configuration>
<source>1.5</source> <source>1.5</source>
<target>1.5</target> <target>1.5</target>
@@ -102,7 +109,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>RELEASE</version> <version>2.4.3</version>
<configuration> <configuration>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
</configuration> </configuration>
@@ -110,12 +117,12 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>RELEASE</version> <version>2.6</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>RELEASE</version> <version>2.7</version>
<configuration> <configuration>
<quiet>true</quiet> <quiet>true</quiet>
<show>public</show> <show>public</show>
@@ -124,7 +131,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<version>RELEASE</version> <version>1.6</version>
<executions> <executions>
<execution> <execution>
<id>package</id> <id>package</id>
@@ -146,7 +153,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>RELEASE</version> <version>2.3.1</version>
<configuration> <configuration>
<archive> <archive>
<manifest> <manifest>
@@ -155,20 +162,15 @@
</archive> </archive>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>RELEASE</version>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId> <artifactId>maven-install-plugin</artifactId>
<version>RELEASE</version> <version>2.3.1</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
<version>RELEASE</version> <version>2.5</version>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
@@ -184,7 +186,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId> <artifactId>maven-gpg-plugin</artifactId>
<version>RELEASE</version> <version>1.1</version>
<executions> <executions>
<execution> <execution>
<id>sign-artifacts</id> <id>sign-artifacts</id>