ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ajack" <aj...@openbiz.biz>
Subject RE: Combining JARs into one JAR
Date Wed, 12 Jun 2002 22:24:42 GMT
 
	> I know the real problem is probably elsewhere, but is there 
	> any simple way (via Ant) to bundle these JARs back into one big 
	> JAR?

	You could build a new jar file with all the others listed as
zipfilesets.

I presume you were referring to something like this. Perhaps inelegant, but
I unjar the *.class files into a tree, then re-jar.

        <!-- Put all classes in ${dist} into ${bundle} -->
        <unjar dest="${bundle}/classes">
            <patternset>
                <include name="**/*.class"/>
            </patternset>
            <fileset dir="${dist}">
                <include name="**/*.jar"/>
                <exclude name="**/*-source.jar"/>
                <exclude name="**/*-javadoc.jar"/>
            </fileset>
        </unjar>

        <jar    jarfile="${bundle}/openbiz-bundle.jar"
                basedir="${bundle}/classes">
        </jar>

Thanks for the help.

regards

Adam

Mime
View raw message