Reference 3Licenses JARs
<path id="3licenses.classpath">
<fileset dir="${externals.dir}/3licenses">
<include name="*.jar" />
</fileset>
</path>
Reference the 3Licenses JAR's ANT Tasks
<taskdef resource="com/appsecinc/ant/3licenses.properties" classpathref="3licenses.classpath" />
Create a Target to Gather Licenses
<target name="gather-licenses">
<collect-licenses src="${externals.dir}" todir="${artifacts.dir}/licenses" maxDepth="3"
xslfile="${externals.dir}/3licenses/manifest.xsl" />
</target>
This collects licenses into ${artifacts.dir}/licenses. You can open
manifest.xml to see a summary. Try
ant gather-licenses.
Excluding DirectoriesYou can exclude external directories from the generated manifest, useful for excluded licenses of build tools that aren't published with the product.
<target name="gather-licenses">
<collect-licenses src="${externals.dir}" todir="${artifacts.dir}/licenses" maxDepth="3"
xslfile="${externals.dir}/3licenses/manifest.xsl">
<externals>
<external src="antelope" include="false" />
<external src="junit" include="false" />
<external src="wix" include="false" />
</externals>
</collect-licenses>
</target>