This may be too late now, but I would personally recommend avoiding the JPF
plugin framework.  Most of the Osmosis codebase is already comprised of
plugins, and you can write your own plugins using the same mechanism.

In a nutshell you need to perform the following steps:

   - Create a new java project.
   - Implement your Osmosis tasks.
   - Create a class that implements the
   org.openstreetmap.osmosis.core.plugin.PluginLoader interface, and register
   your new tasks in its implementation.
   - Add a resource called osmosis-plugins.conf to your project, and add
   the name of your plugin loader class to it.
   - Compile your project to a jar.
   - Add the jar to the Osmosis classpath.

For examples, look at the existing Osmosis projects such as osmosis-apidb,
osmosis-areafilter, etc.


On 23 December 2013 10:51, jotpe <[email protected]> wrote:

> Hello List,
>
> i would like to build a custom plugin for osmosis, but the wiki
> informations are to less for me.
>
> Is there anywhere a tutorial available?
>
> My current problem is an unknown or incompatible version between my plugin
> dependency and the  org.openstreetmap.osmosis.core.plugin.Core
>
> <?xml version="1.0" ?> <!DOCTYPE plugin PUBLIC "-//JPF//Java Plug-in
> Manifest 1.0" "http://jpf.sourceforge.net/plugin_1_0.dtd";> <plugin
> id="OsmosisImporter" version="0.1"> <requires> <import
> plugin-id="org.openstreetmap.osmosis.core.plugin.Core"
> plugin-version="0.43.1" reverse-lookup="false"/> </requires> <runtime>
> <library id="mycode" path="/" type="code"/> </runtime> <extension
> plugin-id="org.openstreetmap.osmosis.core.plugin.Core" point-id="Task"
> id="OsmosismImporter"> <parameter id="name" value="importer"/> <parameter
> id="class" value="de.regioosm.osmosis.plugin.PluginLoader" /> </extension>
> </plugin>
>
> This command causes
> osmosis --read-xml city1.osm --importer
>
>
>
> Caused by: org.java.plugin.PluginLifecycleException: plug-in
> OsmosisImporter requires plug-in org.openstreetmap.osmosis.core.plugin.Core
> which is unknown or has incompatible version
>  at
> org.java.plugin.standard.StandardPluginManager.checkPrerequisites(StandardPluginManager.java:460)
> at
> org.java.plugin.standard.StandardPluginManager.activatePlugin(StandardPluginManager.java:397)
>
>
> My osmosis version is 0.43.1 and the maven dependecies of the plugin
> project is 0.43.1 too. What can i do? Regards Johannes
>
> _______________________________________________
> osmosis-dev mailing list
> [email protected]
> https://lists.openstreetmap.org/listinfo/osmosis-dev
>
>
_______________________________________________
osmosis-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to