Discussion:
[tycho-dev] tycho-versions-plugin does not consider source-features
Jakob Strafer
2017-02-09 18:52:14 UTC
Permalink
Hello Tycho team,

I am not sure if this is a bug or an intended behavior.
When I run the tycho-versions-plugin (0.26.0) on a project with
packaging 'eclipse-repository' which contains a category.xml with a
source-feature-entry (the source feature is generated using the
source-feature-plugin), that entry is not considered during a change
of the version. After looking into the CategoryXmlManipulator of the
plugin, I created a small workaround which solves this issue for me.

In the updateFeatureReferences-method I check for both, original and
source-feature-id (starting at line 52):
for (SiteFeatureRef feature : categoryXml.getFeatures()) {
String featureId = featureVersionChange.getArtifactId();
String srcFeatureId = featureId + ".source";
if ((featureId.equals(feature.getId()) ||
srcFeatureId.equals(feature.getId()))
&&
featureVersionChange.getVersion().equals(feature.getVersion())) {

Best regards,
Jakob
Sievers, Jan
2017-02-10 08:28:52 UTC
Permalink
sounds like a bug to me

if you already have a patch, can you open a bug and propose it? see [1]

Regards
Jan

[1] https://wiki.eclipse.org/Tycho/Contributor_Guide

On 09/02/2017, 19:52, "tycho-dev-***@eclipse.org on behalf of Jakob Strafer" <tycho-dev-***@eclipse.org on behalf of ***@gmail.com> wrote:

Hello Tycho team,

I am not sure if this is a bug or an intended behavior.
When I run the tycho-versions-plugin (0.26.0) on a project with
packaging 'eclipse-repository' which contains a category.xml with a
source-feature-entry (the source feature is generated using the
source-feature-plugin), that entry is not considered during a change
of the version. After looking into the CategoryXmlManipulator of the
plugin, I created a small workaround which solves this issue for me.

In the updateFeatureReferences-method I check for both, original and
source-feature-id (starting at line 52):
for (SiteFeatureRef feature : categoryXml.getFeatures()) {
String featureId = featureVersionChange.getArtifactId();
String srcFeatureId = featureId + ".source";
if ((featureId.equals(feature.getId()) ||
srcFeatureId.equals(feature.getId()))
&&
featureVersionChange.getVersion().equals(feature.getVersion())) {

Best regards,
Jakob

Loading...