ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Castro <0ptikGh...@gmx.us>
Subject How to merge jars and directories specified by path resource into a single jar
Date Thu, 13 Feb 2014 21:26:31 GMT
I have a handful of paths defined as

<path id="class.libs">
    <pathelement location="blah/blah.jar"/>
    ...
</path>

<path id="class.dirs">
    <pathelement location="blah/blah"/>
    ...
</path>

<path id="class.path">
    <pathelement refid="class.libs"/>
    <pathelement refid="class.dirs"/>
</path>

I have a need to merge the .class files in the jars and directories
specified by class.libs and class.dirs into a single jar. I can merge
the jars using

<pathconvert property="class.libs" refid="class.libs"/>

<jar destfile="${jar.file}">
    <fileset dir="${classes.dir}" includes="*.class"/>
    <restrict>
        <name name="**/*.class"/>
        <archives>
            <zips>
                <path path="${class.libs}"/>
            </zips>
        </archives>
    </restrict>
</jar>

How do I include all of the .class files in the directories specified in
class.dirs in ${jar.file} as well?

--
Edwin

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message