Skip to content

deprecate (and remove) feature-source mojo #3458

@laeubi

Description

@laeubi

The feature-source mojo always was a bit tedious to use, for example it requires a manual configuration of meta-data generation to actually work:

if (!isP2GenerationEnabled()) {
logger.warn(
"""
org.eclipse.tycho:tycho-p2-plugin seems not to be enabled but will be required if the generated source-feature is used in an update-site or another feature. You can add the following snippet to your pom:\s
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<executions>
<execution>
<id>attach-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
""");

Beside that, source feature itself are more from an ancient time and modern Tycho does offer much better alternatives with less efforts and even better user experience with less manual work and configuration:

  1. Currently one needs to list all items in a feature to have them included in the source feature, especially for third party dependencies this unnecessarily binds the feature to an exact version that can't be upgraded independently and will need to be maintained manually if dependencies change
  2. source features are handled as artifacts and therefore are downloaded even though they usually not contain anything different (beside the id) than the feature itself
  3. If one wants to have sources included in a target, PDE/Tycho already offer convenient options to specify that sources are desired, even collecting everything that can be found not only items directly declared in a (source) feature.
  4. If one wants to have sources distributed with a site, Tycho offers the option to include all sources automatically, this will again not require them to be listed anywhere and will automatically adapt.
  5. If one wants to install sources together with a product, there is now an option in the materialize product mojo to enable this use case as well.
  6. If one wants sources explicitly mentioned in an update site, Tycho offers dynamic selection of those in category.xml

If one absolutely wants, of course a source feature can still be created as a separate project for very special demands, also existing source features can be used as is, so this is only about removing special support from Tycho for those.

What needs to be done:

  • Add new documentation section in the docs that explains the different ways to include / use source and different options
  • Deprecate the mojo in Tycho 4.x stream link to this issue
  • possibly migrate eclipse platform to no longer ship any source features to prove the feature can completely replaced by existing techniques
  • announce the intend to remove the mojo on cross-project-dev to give projects a last chance to step up if there are still usecases / demands that can't be full filled and evaluate possible ways to archive this in an alternative way
  • remove the mojo from the Tycho 5.x stream

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions