Discussion:
[dash-dev] [m4e] handling of import package and fragments?
Marcel Bruch
2012-06-01 06:21:06 UTC
Permalink
Hi,

I briefly scanned the wiki page of m4e but didn't see a statement how m4e is dealing with imported packages and their versions and how fragments are mapped. Does it recognize them in some way in the dependencies section of the pom?

Thanks,
Marcel
Aaron Digulla
2012-06-01 12:39:56 UTC
Permalink
Post by Marcel Bruch
Hi,
I briefly scanned the wiki page of m4e but didn't see a statement
how m4e is dealing with imported packages and their versions and how
fragments are mapped. Does it recognize them in some way in the
dependencies section of the pom?
I haven't documented the import phase properly, yet. To answer your questions:

The latest snapshot tries to locate dependencies based on imports but
it doesn't support the fancy OSGi features like fragments because
Maven doesn't support that. If you use fragments (i.e. SWT), then
you'll have to specify the correct dependencies in your own POM.

I could support dependency based on importing a version of an API but
that hasn't been implemented so far. First of all, I haven't found an
example where different version ranges are used and I feel very
uncomfortable with the whole idea. At first, it seems like a great
idea to be able to let the container find dependencies based on
imports but the actual implementation means your runtime classpath can
change at any time - something I really don't like.

So what you get in your POMs is a best effort but you should look at
the resulting POMs to check whether the mapping is correct. I should
also report missing dependencies and fragments in the final report but
I don't know when I'll have time to implement this.

I suggest to give the latest mt4e a try. It should work for all
important cases. If you find something that doesn't work, let me know
(or, even better, fix it yourself and send me a patch :-)

Regards,
--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/ http://blog.pdark.de/
Continue reading on narkive:
Loading...