Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] groupId p2.osgi.bundle vs. p2.eclipse-plugin vs. org.eclipse.*?


In a multi-module Xtext build, I'm experiencing a problem with
multiple references to different variants of the same artifact,
where tycho seems to be contributing to the situation in one way
or other [1].

The situation:

(1) Sub module B with packaging eclipse-plugin invokes the Xtext
generator via exec-maven-plugin with xtext specified as a plugin
dependency like so: org.eclipse.xtext:org.eclipse.xtext.xtext.

(2) During that invocation, xtext needs access to sub module A of
the same reactor. Since initially, the generator invocation could not
see A, we specify another plugin dependency, and since that A again
is an eclipse-plugin project, we refer to it as p2.osgi.bundle:A.

Both dependencies transitively pull in an artifact org.eclipse.xtext,
where (1) pulls one in groupId org.eclipse.xtext, whereas (2) pulls
another one in groupId p2.osgi.bundle.
This explodes when the "equivalent" xtext artifacts have different signing.

What's tycho's role in this?
- A does not have any dependencies in its pom, all dependencies are in
  MANIFEST.MF and hence dependencies have no original groupId.
- I seem to understand that tycho translates all MANIFEST dependencies
  into maven dependencies within the groupId p2.osgi.bundle.
- After adding exclusions for p2.osgi.bundle:org.eclipse.xtext into
  the plugin dependencies, the error was "resolved", but it re-occurred
  when switching from maven 3.1 (IIRC) to maven 3.3. At which point
  the conflict changed its name from p2.osgi.bundle to p2.eclipse-plugin.

Hence my questions:

- How does the groupId p2.eclipse-plugin enter the picture?

- What's the impact of switching maven versios (minor)?

- Is it possible to tell tycho, that a dependency with an explicit groupId
  should be seen as providing what a transitive dependency requires
  via MANIFEST.MF (hence with synthetic groupId)?
  IOW: can the included org.eclipse.xtext:org.eclipse.xtext satisfy
  the transitive MANIFEST-derived dependency to org.eclipse.xtext?

You may find some example pom-snippets in the Xtext forum thread [1].
Or ask me for things that are not clear from this description,



Back to the top