Thanks for your reply, Jan. Yes I've seen that documentation, and I
looked through it again just now to make sure I'm not missing
something. That page, like every other jetty documentation and
discussion I've seen in my online searching, discusses deploying
jetty into an OSGI container. I have an app that deploys into an
OSGI container, and it includes the jetty bundles and their
dependencies, and it works.
I'm asking about how I can incorporate jetty into my app in a more
appropriate way. The way I'm doing it now, the jetty bundles are
copied into my eclipse workspace along with the bundles I've
developed, and all these bundles are built against my RCP target
environment (in eclipse during dev time, and by Maven using the
tycho-p2-director plugin).
But this is not the right way to incorporate third party code into
an RCP app. It should be in my RCP target along with the other third
party code that I'm using. But when I do that, jetty is unable to
satisfy the dependency on javax.el 3.0.0, even though I have that
bundle also in my target environment.
As for that bundle, I didn't just grab the jar from Maven and deploy
it. I created an RCP Plug-in that wraps the javax.el jar, using the
eclipse wizard for creating a new "Plug-in from existing jar
archive". This creates an appropriate manifest file for an RCP
Plug-in, with the build path configured to expose the packages
contained in the wrapped jar archive. As I mentioned, I exported the
javax.el package on the Runtime tab of the Manifest editor, and also
tried assigning to that package version 3.0.0, to satisfy the
version checking at the package level, since the error message seems
to indicate that jetty is expressing the dependency as an
"Import-Package" constraint rather than a "Require-Bundle"
constraint.
This is, as I understand it, a typical way to incorporate third
party code into an RCP app, and I've done it many times with other
third party code (including the Jetty jars that run successfully
when bundled with my custom code instead of in the target).
So the question I have is: why does the jetty bundle loaded from the
jetty update site not recognize that the dependence on package
javax.el 3.0.0 is satisfied, even though I have a bundle in my
target environment with that name and version, which exports package
javax.el 3.0.0?
This is an RCP question, so maybe this is not the right list in
which to ask it. But I know that what I'm doing is standard RCP
practice, and I suspect that if I ask why it's not working in an RCP
forum, someone is going to tell me to go ask the jetty people.
-Mark
On 9/25/15 7:15 PM, Jan Bartel wrote:
For osgi, you can't necessarily use the javax.* jars from
maven, as in my experience they often do not contain the
correct manifests. If you follow the advice on the page
above,you should be ok.
Jan
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
|