Hi Devs, Hope tomcat community can consider bundle-ify the jars so that they can be used in OSGi framework. Currently, we have to make the bundles by ourselves. There are two approaches to achieve this. One is bundle-ify the "spec" and "impl" jars directly. The other one is make a separate mvn project to do this job and bind the two jar together as a bundle. As shown in the patch. Any comments about this idea? -Rex
Created attachment 26145 [details] A patch for approach #2
Should we add the meta-data to all jars anyway (option 1)? Could you provide a patch to the POMs to run the OSGi plugins? If we produce a bundle of spec and impl, would it just expose the spec API and keep the impl internal? Would this work with a standalone JSP container where the JSTL library would be in the webapp rather than the container classpath?
(In reply to comment #2) > Should we add the meta-data to all jars anyway (option 1)? Could you provide a > patch to the POMs to run the OSGi plugins? Hi Jeremy, Sure, the attachment are the 2 patches for option #1. One for impl and spec; One for parent. > > If we produce a bundle of spec and impl, would it just expose the spec API and > keep the impl internal? Would this work with a standalone JSP container where > the JSTL library would be in the webapp rather than the container classpath? I not sure I understand the situation. A OSGi bundle is a normal jar with some special metadatas in MANIFEST.MF, so I think the EXPORT header won't take any effect when the bundle is put in normal Java class path. It will just be considered as a normal jar. thanks -Rex
Created attachment 26211 [details] the patch for impl and spec
Created attachment 26212 [details] the patch for parent pom
Hi Jeremy, If you decide apply the patches. Could you please deploy the build artifacts to Apache snapshot site after that? Then we can run the TCK to test the jstl bundles in the Geronimo community. regards, -Rex
Patches applied, thanks.
I'm seeing the following warning for the compat and jstlel modules: [WARNING] Warning building bundle org.apache.taglibs:taglibs-standard-compat:bundle:1.2-SNAPSHOT : Did not find matching referal for org.apache.x* Do we need to add something to their configuration?
(In reply to comment #8) > I'm seeing the following warning for the compat and jstlel modules: > > [WARNING] Warning building bundle > org.apache.taglibs:taglibs-standard-compat:bundle:1.2-SNAPSHOT : Did not find > matching referal for org.apache.x* > > Do we need to add something to their configuration? I think that because the jstlel and compat don't need the dependency: <dependency> <groupId>xalan</groupId> <artifactId>xalan</artifactId> <version>2.7.1</version> <scope>provided</scope> </dependency> you can remove it and also the <Import-Package>org.apache.x*;resolution:=optional,*</Import-Package> in maven-bundle-plugin instructions. -Rex
hi should we also remove the dependency in jstlel and compat? <dependency> <groupId>xalan</groupId> <artifactId>xalan</artifactId> <version>2.7.1</version> <scope>provided</scope> </dependency> I did not find any class import the packages from xalan in these two projects. -Rex
Resolving now #50462 has been fixed.