Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349115 - [extensibility] Enable use of Tycho's dependency resolver in other packaging types
Summary: [extensibility] Enable use of Tycho's dependency resolver in other packaging ...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 353889
Blocks:
  Show dependency tree
 
Reported: 2011-06-11 06:35 EDT by Tobias Oberlies CLA
Modified: 2021-04-28 16:55 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Oberlies CLA 2011-06-11 06:35:33 EDT
Currently, the behaviour of the Tycho dependency resolver is coupled to Tycho's packaging types. This prevents other projects from defining new packaging types that re-use Tycho's dependency resolver, e.g. for a specialised test setup that otherwise require a lot of POM configuration.

To enable the re-use of Tycho's dependency resolver, there are different options:

1 - The configuration solution) Add a configuration parameter to @target-platform-configuration@ that allows to enable the behaviour of one of Tycho's packaging type, e.g. @strategy=eclipse-plugin@. The resolver they first checks that parameter, and falls back to the packaging type name if the parameter is unset. Drawback: AFAIK it is not possible to set parameters through the packaging type, so the users of the custom packaging type need to set this property manually in each POM.

2 - The mapping solution) Add a configuration parameter to @target-platform-configuration@ that allows to extend the mapping of packaging types to resolver behaviour. This mapping could be defined in a parent POM to enable the Tycho resolver for one or multiple custom packaging type.

3 - The big solution) Promote afterProjectsRead to a real lifecycle phase in Maven, and completely implement the Tycho dependency resolver in a mojo. Tycho's packaging types would each bind a different goal of the dependency resolution mojo to the new "pre-build-order" phase, and so could other packaging types. Properly done, this would allow to make Tycho's dependency resolver fully extensible.
Comment 1 Tobias Oberlies CLA 2011-06-11 06:43:54 EDT
Solution 2 and 3 would also greatly simplify the implementation of bug 340770.
Comment 2 Tobias Oberlies CLA 2013-02-12 03:13:47 EST
Option 3 is the one that we'll probably implement (eventually): The POC of bug 353889 already implements an extension mechanism for the build ordering: As today there is code executed in the afterProjectsRead callback, but that code determines what to do based on marker mojos that can be configured in any packaging type.
Comment 3 Igor Fedorenko CLA 2013-02-12 16:47:09 EST
Option #3 does not work with plain maven plugins. The proper solution requires new extension point(s) in Maven core that would allow extensions plugins participate in maven dependency resolution.
Comment 4 Mickael Istria CLA 2021-04-08 18:09:27 EDT
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present when latest release:
* Create a new issue at https://github.com/eclipse/tycho/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.