[osmosis-dev] Osmosis plugin development and integration tests

Brett Henderson brett at bretth.com
Thu Jan 24 08:56:42 GMT 2013


Hi Nicolas,

On 12 January 2013 09:33, Nicolas Colomer <ncolomer at ymail.com> wrote:



> So I tried to reproduce these tests but I face some class loading issue
> (always the same Exception, even for simple commands that involve only xml
> reading / writing):
>
> java.lang.NoClassDefFoundError: org/java/plugin/PluginLifecycleException
>         at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:80)
>         at
>

It looks like you're missing a required library.

This class is located in the jpf (Java Plugin Framework) library which is
included as a dependency of the core project.  If you're including the core
project/lib as a dependency then you should automatically get jpf as a
transitive dependency.

Are you using gradle to build your project?


>
> Do you have any idea to solve this?
> How declare and load my plugin programmatically so that I can use it via
> command parameters? Do I have to add some resources in my classpath (as for
> Osmosis, when you declare pluginLoader class in the
> $OSMOSIS_HOME/config/osmosis-plugins.conf file)?
>

Your project will need an osmosis-plugins.conf file containing the name of
your plugin loader class, but otherwise that should be all you need so long
as you have all the necessary jars available on your classpath.

Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20130124/1822f01d/attachment.html>


More information about the osmosis-dev mailing list