[osmosis-dev] Problem using Osmosis (PluginLifecycleException)

marcus.wolschon at googlemail.com marcus.wolschon at googlemail.com
Wed Nov 11 11:52:56 GMT 2009


On Wed, 11 Nov 2009 22:37:27 +1100, Brett Henderson <brett at 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.

Marcus




More information about the osmosis-dev mailing list