Re: [osmosis-dev] Problem using Osmosis (PluginLifecycleException)

2009-11-11 Thread Brett Henderson
On Wed, Nov 11, 2009 at 4:03 PM, Marcus Wolschon 
marcus.wolsc...@googlemail.com wrote:

 On Tue, Nov 10, 2009 at 11:03 PM, Brett Henderson br...@bretth.com
 wrote:

  Changing osmosis.bat is not the problem but how can I do an entry
  Does
  anybody know how to build a classpath list based on the jars contained in
 a
  directory within ant?

 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.
___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


Re: [osmosis-dev] Problem using Osmosis (PluginLifecycleException)

2009-11-11 Thread marcus.wolschon
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.

Marcus

___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


Re: [osmosis-dev] Problem using Osmosis (PluginLifecycleException)

2009-11-10 Thread marcus.wolschon
On Tue, 10 Nov 2009 12:36:32 +0100, Kai Behncke kai-behn...@gmx.de
wrote:
 Hi Marcus,
 
 Changing the .bat will be enough to make it work.
 
 I hoped it would be but in my case it does not work.
 
 I did:
 
 
 ---

%MYAPP_HOME%\osmosis.jar;%MYAPP_HOME\lib\test\jpf-1.5.jar;%MYAPP_HOME%\lib\commons-logging.jar;%MYAPP_HOME%\lib\mysql-connector-java-5.0.7-bin.jar;%MYAPP_HOME%\lib\postgresql-8.3-603.jdbc4.jar;%MYAPP_HOME%\lib\postgis_1.3.2.jar
 %MAINCLASS% %OSMOSIS_OPTIONS% %*


%MYAPP_HOME%\lib\test\jpf-1.5.jar, not %MYAPP_HOME\lib\test\jpf-1.5.jar

Marcus

___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev