ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Saving Manifest Definitions for later
Date Wed, 16 Feb 2011 15:47:17 GMT
I have two jar tasks that use the same <manifest> setup in their Jar task:

        <jar destfile="${archive.dir}/claims-ejb.jar"
            manifest="${ejb.metainf.dir}/MANIFEST.MF">
            <manifest>
                <section name="claims-container.jar">
                    <attribute name="Specification-Title"
value="claims-container.jar"/>
                    <attribute name="Specification-Version"
value="${spec.version}"/>
                    <attribute name="Specification-Vendor"
value="${spec.vendor}"/>
                    <attribute name="Implementation-Title"
value="claims-container.jar"/>
                    <attribute name="Implementation-Version"
value="${impl.version}"/>
                    <attribute name="Implementation-Vendor"
value="${impl.vendor}"/>
                </section>
            </manifest>

I'd like a way to create a reference to this Manifest setup like you
can with <patternsets> or <paths>, so I don't have to keep repeating
this over and over (Okay, it's just seven lines and it's only twice).
Something like this:

        <manifestset id="manifest.ref">
                <section name="claims-container.jar">
                    <attribute name="Specification-Title"
value="claims-container.jar"/>
                    <attribute name="Specification-Version"
value="${spec.version}"/>
                    <attribute name="Specification-Vendor"
value="${spec.vendor}"/>
                    <attribute name="Implementation-Title"
value="claims-container.jar"/>
                    <attribute name="Implementation-Version"
value="${impl.version}"/>
                    <attribute name="Implementation-Vendor"
value="${impl.vendor}"/>
                </section>
        <jar destfile="${archive.dir}/claims-ejb.jar"
            manifest="${ejb.metainf.dir}/MANIFEST.MF">
            <manifest refid="manifest.ref"/>

Is there a way I could do this, maybe using generic or string references?

-- 
David Weintraub
qazwart@gmail.com

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


Mime
View raw message