Hello all,
trying to migrate from the maven-osgi-plugin (that was deprecated.....
;)) to the maven-bundle-plugin I got stuck with our XML parser 'wrapper'
bundle. Can anyone give a hint how to configure this with the new
plugin?
The maven-osgi-plugin configuration below worked like a charm resulting
in a 2k bundle with no classes and just the two javax.xml.parsers.*
provider configuration files we put in the META-INF/services. At runtime
it registers the services as expected.
Now using the maven-bundle-plugin I get a build-time 'Bundle-Activator
not found on the bundle class path or imports'. Note that in both
situations the org.osgi.compendium is on the build classpath with a
provided scope. When changing this to a compile scope the build actually
succeeds but also results in inclusion of the compendium classes :(
So how can I convince the bundle plugin that the activator actually is
on the classpath and that the classes shouldn't included but imported?
thank you!
best regards,
Bram
--------------------------------
maven-osgi-plugin configuration
--------------------------------
in the pom...
<plugin>
<groupId>org.apache.felix.plugins</groupId>
<artifactId>maven-osgi-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<osgiManifest>
<bundleActivator>org.osgi.util.xml.XMLParserActivator</bundleActivator>
<bundleName>XML Parser</bundleName>
<importPackage>javax.xml.parsers,
org.osgi.framework, org.osgi.util.xml</importPackage>
<exportPackage />
</osgiManifest>
</configuration>
</plugin>
in the manifest...
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: bramk
Build-Jdk: 1.5.0_12
Bundle-Activator: org.osgi.util.xml.XMLParserActivator
Bundle-Version: 9.2.2.SNAPSHOT
Bundle-ManifestVersion: 2
Bundle-Vendor: GX Creative Online Development
Import-Package: javax.xml.parsers,org.osgi.framework,org.osgi.util.xml
Bundle-Name: GX WebManager XML Parser
Bundle-Classpath: .
Bundle-SymbolicName: nl.gx.webmanager.bundles.webmanager-xmlparser-bun
dle
--------------------------------
maven-bundle-plugin configuration
--------------------------------
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>org.osgi.util.xml.XMLParserActivator</Bundle-Activator
>
<Bundle-Name>XML Parser</Bundle-Name>
<Import-Package>javax.xml.parsers,
org.osgi.framework, org.osgi.util.xml</Import-Package>
<Export-Package />
</instructions>
</configuration>
</plugin>
[ERROR] Bundle-Activator not found on the bundle class path or imports:
org.osgi.util.xml.XMLParserActivator
org.apache.maven.plugin.MojoFailureException: Found errors, see log
at
org.apache.felix.tools.maven2.bundleplugin.BundlePlugin.execute(BundlePl
ugin.java:153)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]