Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[egit-dev] Re: [master] Change I5828502f: (egit/parallelip-jgit) Change jgit build to be completely manifest first

Shawn O. Pearce wrote:
Igor Fedorenko <ifedorenko@xxxxxxxxxxxx> wrote:
I was going to finish font&colour decoration tonight, but I'll try to
make the tests work in cli instead. Assuming my wife won't find other
things for me to do, that is ;-)

Thanks.

I had a very quick look. You have the same package, say
org.eclipse.jgit.treewalk, defined both in org.eclipse.jgit and
org.eclipse.jgit.test bundles. You also use Import-Package to wire
org.eclipse.jgit and org.eclipse.jgit.test together. Normally, there is
only one producer of each package, so Import-Package gets resolved to
org.eclipse.jgit, which effectively hides test classes at runtime.

I see few possible solutions here.

If running the tests in OSGi runtime is not required, I can switch them
back to plain junit launcher. This may require switching test project
back to pom-first mode, but I don't know for sure yet.

We can rename test packages to make sure they don't overlap with real
code. This will only work if tests do not access package protected
members from production code, of course.

There are few OSGi tricks, like fragment bundles and split packages,
which can probably that let you run the tests in OSGi runtime without
changing packages names, but I will let Chris comment on these.

Also, keep in mind that bundle classloader.getResource and similar
methods return bundleentry:// urls, but there are at least few places in
the tests where you do "new File(cl.getResource(...).toURI())". This
will have to change to run in OSGi runtime.



And, btw, jetty does publish p2 repo [1], but they do not advertise it
too much for some reason. We use jetty to test our internal m2e
derivatives quite successfully.

[1] http://download.eclipse.org/jetty/7.0.0.v20091005/update/

How the heck did you find that URL?  I spent 2 hours digging around
their website and trying things like that, and P2 just kept kicking
back saying it wasn't an update site...


One of our developers asked webtide folks ;-). The irony, I spent almost
two days extending tycho to be able to mix p2 and maven repositories.
When I was done and said the final "woo-hoo!" that developer gave me
jetty p2 repo url.

--
Regards,
Igor


Back to the top