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