I'm the maintainer of the hamcrest OSGi bundles at eclipse.org, and
wanted to provide inputs to help resolve some of the pain points with
hamcrest.
Here's the situation:
Hamcrest (v1.1) provides a few jars (or bundles in OSGi land) for the
sake of naming them the OSGi way:
- org.hamcrest.core
- org.hamcrest.integration
- org.hamcrest.library
There are others but I'll leave them out of this email for now.
The general convention in the OSGi land to wire up bundles is to use the
'Import-Package' header which basically auto-wires bundles based on
which bundle exports the package.
Things get really funny when two or more bundles export the same
package. This is happening in the case of all the above bundles
containing classes in the org.hamcrest.core namespace therefore causing
confusion and complexities for downstream OSGi packagers and consumers
who use hamcrest.
I understand that this is rather late in the 1.2 development cycle, but
would the development team want to consider making a change so that
org.hamcrest.library would for e.g. export org.hamcrest.core as
org.hamcrest.library instead.
What would be preferred is to rename everything org.hamcrest.* in
org.hamcrest.library as org.hamcrest.library.*. But I believe this would
completely break all clients and hamcrest 1.2 would no longer be
backward compatible.
Thoughts, brickbats ?
-- Ketan
http://eclipse.org/swtbot -- SWT/Eclipse UI Testing
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268881#c0
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268881#c5
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268881#c8
-- Ketan
http://eclipse.org/swtbot -- SWT/Eclipse UI Testing
Sorry for the grumpy tone of my last mail.
JUnit distribute Hamcrest as part of junit-4.x.jar just as a
convenience, so that programmers can put the JAR on their classpath
and not worry about other dependencies. OSGi packaging is definitely
outside that use case, so it sounds like packaging junit-4.x.jar as an
OSGi bundle is the wrong thing to do.
JUnit also distribute junit-deps-4.x.jar. This does not contain
Hamcrest in it. It sounds like the problem can be addressed by
building the JUnit OSGi bundle from junit-deps-4.x.jar and making that
depend on the hamcrest OSGi bundles.
--Nat
"JUnit" is not in the business of creating OSGi bundles at all. Let
me know if this issue needs clarification.
David Saff