Community
Participate
Working Groups
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.
Solution 2 and 3 would also greatly simplify the implementation of bug 340770.
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.
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.
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.