Build narya-tools with jarjar so as to hide its included dependencies in the

unfortunate event that someone puts it on a real project classpath.

Modified GenTask to totally hide Velocity from derived classes so that external
libraries can make use of it in their own Ant tasks without inheriting a
Velocity dependency and also becoming booched because Velocity was renamed in
jarjar and won't link against an unrenamed Velocity.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6185 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2010-10-12 17:35:41 +00:00
parent 480893d0b0
commit f4af1915b0
6 changed files with 119 additions and 108 deletions
+9 -2
View File
@@ -209,7 +209,9 @@
<exclude name="**/*.html,**/*.png"/>
</fileset>
</jar>
<jar destfile="${deploy.dir}/${lib.name}-tools.jar">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpathref="classpath"/>
<jarjar destfile="${deploy.dir}/${lib.name}-tools.jar">
<fileset dir="${classes.dir}">
<include name="com/threerings/io/**"/>
<include name="com/threerings/presents/**"/>
@@ -220,7 +222,12 @@
<zipfileset src="${deploy.dir}/lib/javassist.jar"/>
<zipfileset src="${deploy.dir}/lib/guava.jar"/>
<zipfileset src="${deploy.dir}/lib/commons-collections.jar"/>
</jar>
<rule pattern="com.google.**" result="cgc.@1"/>
<rule pattern="org.apache.velocity.**" result="oav.@1"/>
<rule pattern="org.apache.commons.collections.**" result="oacc.@1"/>
<rule pattern="com.samskivert.**" result="cs.@1"/>
<rule pattern="javassist.**" result="ja.@1"/>
</jarjar>
<jar destfile="${deploy.dir}/${lib.name}-tests.jar">
<fileset dir="tests/${classes.dir}" includes="com/threerings/**"/>
</jar>