<div class="gmail_quote">On Wed, Nov 11, 2009 at 10:52 PM, <span dir="ltr"><<a href="mailto:marcus.wolschon@googlemail.com">marcus.wolschon@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 11 Nov 2009 22:37:27 +1100, Brett Henderson <<a href="mailto:brett@bretth.com">brett@bretth.com</a>><br>
wrote:<br>
<div class="im">>> <a href="http://ant.apache.org/manual/CoreTasks/jar.html" target="_blank">http://ant.apache.org/manual/CoreTasks/jar.html</a><br>
>> That would be the <attribute> sub-element.<br>
>><br>
><br>
> Unless I'm misunderstanding the attribute element that's not quite what I<br>
> meant.<br>
><br>
> I already have the following snippet in build.xml.<br>
> <manifest file="build/binary/jar.txt"><br>
> <attribute name="Main-Class"<br>
> value="org.openstreetmap.osmosis.core.Osmosis"/><br>
> <attribute name="Built-By" value="${<a href="http://user.name" target="_blank">user.name</a>}"/><br>
> <attribute name="Implementation-Title" value="Osmosis<br>
> Library"/><br>
> <attribute name="Implementation-Version"<br>
> value="${project.version} (${TODAY})"/><br>
> <attribute name="Implementation-Vendor" value="Brett<br>
> Henderson"/><br>
> </manifest><br>
><br>
> I could add a classpath element, but I don't know how to add it<br>
dynamically<br>
> so that I don't have to hard code the list of jars.<br>
<br>
<br>
</div>I haven't tried it but this could do the trick:<br>
<br>
<a href="http://stackoverflow.com/questions/1456852/ant-commands-to-print-fileset-into-a-file-one-match-per-line" target="_blank">http://stackoverflow.com/questions/1456852/ant-commands-to-print-fileset-into-a-file-one-match-per-line</a><br>
<br>
<fileset id="libs" dir="../lib/test"><br>
<include name="*.jar" /><br>
</fileset><br>
<property name="jars" refid="libs" /><br>
<div class="im"><manifest file="build/binary/jar.txt"><br>
<attribute name="Main-Class"<br>
value="org.openstreetmap.osmosis.core.Osmosis"/><br>
<attribute name="Built-By" value="${<a href="http://user.name" target="_blank">user.name</a>}"/><br>
<attribute name="Implementation-Title" value="Osmosis<br>
Library"/><br>
<attribute name="Implementation-Version"<br>
value="${project.version} (${TODAY})"/><br>
<attribute name="Implementation-Vendor" value="Brett<br>
Henderson"/><br>
</div> <attribute name="Class-Path" value="${jars}"/><br>
</manifest><br>
<br>
Now how to change ";" into ":" in ${jars}....<br>
But maybe it works anyway.<br></blockquote><div> </div><div>Okay, cool. I'll try it out when I get a chance.<br></div></div><br>