On 12/22/2014 12:32 PM, Stefan Seelmann wrote:
> On 12/20/2014 06:40 PM, Stefan Seelmann wrote:
>> I'm finally done with creating the tests. The main thing they test is to
>> start on OSGi container and install all bundles of the LDAP API to
>> verify the the bundles are valid an and dependencies can be wired.
>>
>> I'll move it now from my sandbox to the API trunk as new maven module
>> and make it part of the main build.
> 
> Hi guys,
> 
> I just wanted to ask if the shared/API project build works for you,
> especially the new integ-osgi module I added. It worked for me, but now
> I wiped my .m2/repository (because of some strange behaviour, I'll write
> more about that later) and the OSGi tests fail now:
> 
> ERROR: Bundle org.apache.directory.api.ldap.codec.core [18] Error
> starting
> file:/tmp/1419246180714-0/bundles/org.apache.directory.api.ldap.codec.core_1.0.0.M27-SNAPSHOT.jar
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.directory.api.ldap.codec.core [18]: Unable to resolve 18.0:
> missing requirement [18.0] osgi.wiring.package;
> (&(osgi.wiring.package=org.apache.directory.api.ldap.model.entry)(version>=1.0.0.M27-SNAPSHOT))
> [caused by: Unable to resolve 42.0: missing requirement [42.0]
> osgi.wiring.package; (&(osgi.wiring.package=antlr)(version>=2.7.7))])

I found the problem, I was able to reproduce it on Jenkins by
configuring "Use private Maven repository".

For OSGi tests I replace the original Maven artifacts that are not valid
OSGi bundles (like antlr, dom4j, etc.) with valid ones.

For Studio we already generated them, e.g.
org.apache.directory.studio:org.antlr.antlr:2.7.7, back in 2012 and
deployed it to maven central. Unfortunately the version deployed on
maven central doesn't contain version information in export-package
instruction, so an import-package with version 2.7.7 won't work.

However when building the Studio trunk locally (which I did before) our
custom antlr is built again and installed to the local maven repo, with
same version 2.7.7, but now the export-package instruction of the
generated manifest.mf now contian the version information.

Holy crap. One step up and two steps back.

What to do?

We need proper OSGi-ified dependencies for antlr, dom4j, xpp3, for
shared/API and probably others for ApacheDS.
* Either we generate and deploy them by ourselfes, similar to what we
did in Studio.
* Or we try to use existing ones. ServiceMix guys hava a bunch available
in maven central with groupId org.apache.servicemix.bundles, at least
dom4j is there. The Spring "Enterprise Bundle Repository" also contains
a lot.

Kind Regards,
Stefan

Reply via email to