Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Tycho seems to not pull guice-multibinders properly… possibly because it's a fragment? (Was: Re: Guice and multibinders OSGI versioning and metadata)

On Jun 6, 2012, at 12:36 PM, Igor Fedorenko wrote:

> There is no integration between m2e and pde workspace target platform.
> This is due to PDE limitations, nothing we can do to improve the
> situation, short of rewriting pde, which is not something high in my
> priority list at the moment. As a workaround, you have to setup PDE
> target platform manually. Either collect required bundles in local
> eclipse-installation-like directory structure or use .target file, if
> you don't mind guice bits from orbit.

Ok, Igor… thanks for bearing with me.  IANA OSGI Expert, so how I believe things should be functioning has been blown apart in this process, as I try to piece together maven docs, tycho docs, OSGI specs, and mailing-list/Stack-Overflow output.  Your patience is appreciated. 

I think I'm starting to see how things work here, and please correct any misunderstandings herein.  I was having things in my environment pollute the situation in a way that made it hard to reason about.  Let me see if I really understand what you're saying (and what I've been reading).

Tycho pulls from p2 repositories and can consider m2 repositories if the items have OSGI metadata.  That's all fine and good, and it'll pull in the bundles to do compilation and other tasks through maven or the p2 resolver.  So far so good.  yes? 

As I understand it, now, Eclipse's PDE has to know about everything through p2 resolution.  If i happen to have things kicking around locally, it might resolve those first (open projects, or things pushed into my workspace that satisfy the bundle and fragment dependencies), but the PDE is entirely uninterested in what tycho has produced.  This happens to include open PDE projects, which maven-bundle-plugin projects happen also to be, so PDE can satisfy the dependency properly from within the eclipse environment… the maven element is entirely unrelated.  

So, if I want to work on things between the command-line and eclipse I have to maintain my dependencies in the pom.xml file, and ALSO have eclipse see the bundles through some other means, which may be a local p2 repository, or something like Orbit.   Or keep open PDE projects for all dependencies that aren't in a p2 repo.  Correct? 

So, three things then:

1. Your project did not work in eclipse.  It worked from the command-line, but even with Orbit, in a clean workspace, it didn't pull in the fragment for multibindigs, so I still get no resolution in the PDE.  

2. Would it help if we maintained a p2 complaint repository of guice artifacts?

3. Is Sonatype planning on manifesting OSGI-compliant bundles that are held within the central m2 repo?  I had read something about Nexus and OSGI p2 repos. 

> I did not expect Tycho to honour Eclipse-ExtensibleAPI, so I am
> surprised you needed it to make command line build work.

I have gone back and forth so many times and now I'm confused again on this point.  I think I had too many variables in my testing and so it seemed this was so.  At this point, it seems to not matter - it was co-incident with Eclipse 3.8 caching a copy of guice from orbit into an eclipse38/test/plugins directory and satisfying the p2 dependency from there.

Is there a way that Tycho could have a goal that pulled together a p2 repository locally out of all your m2-satisfied dependencies?  

Also, argh.

cheers,
Christian.

Back to the top