Hamcrest should be an osgi bundle #11

Closed
rgrunber opened this Issue Sep 27, 2012 · 17 comments

Projects

None yet

7 participants

@rgrunber

I've seen discussion of this at http://code.google.com/p/hamcrest/issues/detail?id=173 , and the topic has come up in regards to doing the same for Junit (https://github.com/KentBeck/junit/issues/212). Is there any plan for this ?

@scarytom
Member

I started looking at this, but there are no plans in the near future.

@Tibor17
Tibor17 commented Sep 28, 2012

@scarytom I will have a look on this and update build.xml using BND plugin.
I designed the solution of OSGi bundle and Maven project for the JUnit.

@sf105
Member
sf105 commented Sep 28, 2012

@Tibor17 thanks. I'm afraid I don't have a personal need for this, so I've neglected it.

@scarytom
Member

@Tibor17 thanks. The build.xml is a bit recursive at the moment thanks to the generation of the factory classes. -- another thing I'm working on. Let me know if you need any help.

@scarytom
Member

@Tibor17 just wondered whether you got anywhere with this. This issue is getting a but crusty and I'm inclined to close as WONT_FIX if nobody is looking at it at all.

@sf105
Member
sf105 commented Jan 27, 2013

Out of curiosity, does this have to be done within the hamcrest project? Or could it be an extension?

@scarytom
Member

As, at least in part, it involves tinkering with the META_INF inside the jars, I don't know how easily it would work as an extension.

@sf105
Member
sf105 commented Jan 27, 2013

Is it enough if we just put the relevant stuff in the META files?

@scarytom
Member

I think so, but working out the right stuff and baking it into the build scripts isn't trivial, mainly thanks to the magic hamcrest-all bundle... oh how I wish we could ditch that. That said though, I don't want to overplay the issues here -- it isn't that hard.

@mattbishop

I'd like to use Hamcrest in a non-testing application, and our system runs in OSGi so we have to have this. I have only done maven BND plugin config before, but if no one has started working on this I can have a look.

@scarytom
Member
scarytom commented Apr 6, 2013

Thanks @mattbishop

Nobody is looking at this at the moment, so feel free to take it on. I'm happy to help with making the necessary changes to the ant build scripts, if you can work out what metadata needs to go where.

@Tibor17
Tibor17 commented Apr 7, 2013

@mattbishop
I submitted pull #32 . Can you have a look and check it out in your environment?
Build with command
ant -Dversion=1.2.3

@mattbishop

My initial view of the pull is that it looks right. I can build it and give
it a whirl this week at work.

Why such an old version of BND? The latest stable release is 2.0.0.

On Sat, Apr 6, 2013 at 5:05 PM, Tibor Digana notifications@github.comwrote:

@mattbishop https://github.com/mattbishop
I submitted pull #32 #32. Can you have a look and check it out in your environment?
Build with command
ant bundle -Dversion=1.2.3


Reply to this email directly or view it on GitHubhttps://github.com/hamcrest/JavaHamcrest/issues/11#issuecomment-16006594
.

@Tibor17
Tibor17 commented Apr 8, 2013

@mattbishop
I checked it out, the latest biz.aQute:bnd:1.50 for ANT released in 2012, but biz.aQute:bndlib:2.0 for Maven.
Can you please rebuild and use the hamcrest libs in your OSGi application?

@josephw josephw added a commit to josephw/JavaHamcrest that referenced this issue Dec 2, 2014
@josephw josephw Generate OSGi bundle manifests for core and library (#11).
Include maven-bundle-plugin to generate the default OSGi
manifests for the core and library artifacts.
79de97a
@josephw
Contributor
josephw commented Dec 2, 2014

This could potentially be a small change on top of moving to Maven or Gradle; see 79de97a for a take on it using all the defaults.

@josephw josephw added a commit to josephw/JavaHamcrest that referenced this issue Feb 26, 2015
@josephw josephw Apply the 'osgi' plugin, so the jar includes a bundle manifest.
This fixes #11. The plugin automatically determines Import-Package and
Export-Package based on analysis of the classes, and also adds
Tool, Bundle-Name, Bundle-Version, Bundle-SymbolicName and
others.
e4efad6
@cvgaviao

Any news about this issue?

@josephw
Contributor
josephw commented Sep 7, 2015

@cvgaviao This is addressed by #98 . If you're an interested OSGi user, please comment over there to confirm that it's a fix.

@sf105 sf105 closed this in #98 Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment