In my project I am using maven in that I have added a third party library dependency in my project pom.xml using
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r6</version>
</dependency>
now so this jar is coming in my local repo at the time of compiling I am able be see in maven dependency. Now I want to make a super jar which include three jar file two are in my eclipse work space and one in local repo . So I am able to include two file using below code
<property name="First.jar" value="${basedir}/../Some/bin/SomeFirst-${project.version}.jar" />
<available file="${First.jar}" type="file" property="First-found" />
<fail unless="First-found" message="ERROR: failed to find First.jar, looked here: ${First.jar}" />
<!-- verify second.jar is available -->
<property name="second.jar" value="${basedir}/bin/some-project-name-${project.version}.jar" />
<available file="${second.jar}" type="file" property="second-found" />
<fail unless="second-found" message="ERROR: failed to find second.jar, looked here: ${second.jar}" />
<!-- glue all jars together into a super jar -->
<zip destfile="${super.jar}">
<zipfileset src="${Second.jar}" />
<zipfileset src="${First.jar}" excludes="META-INF/*,connectors/*" />
<zipfileset src="Need third file relative path here " excludes="META-INF/*" />
</zip>
I am able to work with full path like:
<zipfileset src="C:/Users/xxx/.m2/repository/com/google/android/support-v4/r7/support-v4-r7.jar" />
But I am sure this will not work on others system. So how can i refer support-v4-r7.jar from local repo to Pom.xml relatively.