Yes, the solution here is <Include-Resource>...if you look at the
framework pom.xml file you can see that we use this to copy our patches
over the OSGi classes.
Regarding class path ordering, I thought Maven set up the class path so
that dependencies came before the target classes anyway...at least we
were having an issue with this when Felix was two JARs (i.e., osgi.jar
and felix.jar)...in this case it was always finding the non-patched OSGi
classes in osgi.jar first.
-> richard
Carsten Ziegeler wrote:
Thanks for the answer, Peter! Yes we could use this is kind of a workaround.
The deeper question for me is, if this could/should be fixed in the
plugin (or bnd)? So classes earlier in the class path take precedence
over classes later in the classpath?
CARSTEN
Peter Kriens wrote:
You can use Include-Resource to include the classes from your sources.
The classpath expansion looks for a package along the classpath, if
found it does not look further. However, Include-Resource works
independent from this expansion.
Kind regards,
Peter Kriens
CZ> Hi,
CZ> we are using the maven bundle plugin (which works great btw) and now
CZ> face the following problem:
CZ> Together with our own code we want to bundle a 3rd party library and at
CZ> the same time override some classes from this library with our own
CZ> classes (to include some hot fixes and patches).
CZ> So, basically we have a maven project which has our own code and the
CZ> patch code in source, a dependency to the 3rd party library and that's
CZ> it. When building the bundle, it seems that the clases from the 3rd
CZ> party artifact are preferred and therefore our patches never make it
CZ> into the bundle.
CZ> Is there a way of achieving this?
CZ> Regards
CZ> Carsten