Bug 371884 - tycho-versions-plugin does not change version of the target platform configuration
Summary: tycho-versions-plugin does not change version of the target platform configur...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 minor (vote)
Target Milestone: ---   Edit
Assignee: Jan Sievers CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, helpwanted
Depends on:
Blocks:
 
Reported: 2012-02-17 08:41 EST by Borislav Arnaudov CLA
Modified: 2021-04-28 16:54 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Borislav Arnaudov CLA 2012-02-17 08:41:45 EST
Build Identifier: 0.14.0

Hi all,
The issue I am currently facing is that when I use the versions plugin to change my project version it does not change the version of my target platform. The target platform is a submodule in my project and is described in the configuration of the target-platform-configuration plugin.

I know that the configuration of target-platform-configuration is a plugin configuration, but since the whole tycho build is based on it and it is a little annoying to change the target-platform version every time I change the version of my project.

I would propose that the versions plugin to be able to change the target platform version.



Reproducible: Always

Steps to Reproduce:
Run versions plugin on any project that defines a target platform which is a subproject in the build.
Comment 1 Robert Munteanu CLA 2014-06-23 07:08:03 EDT
This works for me with tycho 0.20.0, can you please retest?
Comment 2 Andreas Sewe CLA 2014-06-23 11:59:33 EDT
(In reply to Robert Munteanu from comment #1)
> This works for me with tycho 0.20.0, can you please retest?

I am not sure whether you are talking about the same thing. I think Borislav is talking about a POM like this one:

<plugin>
                                <groupId>org.eclipse.tycho</groupId>
                                <artifactId>target-platform-configuration</artifactId>
                                <configuration>
                                        <target>
                                                <artifact>
                                                        <groupId>org.eclipse.recommenders.codesearch</groupId>
                                                        <artifactId>luna</artifactId>
                                                        <version>0.5.0-SNAPSHOT</version>
                                                </artifact>
                                        </target>
                                </configuration>
                        </plugin>
Comment 3 Andreas Sewe CLA 2014-06-23 12:08:05 EDT
(In reply to Andreas Sewe from comment #2)
> (In reply to Robert Munteanu from comment #1)
> > This works for me with tycho 0.20.0, can you please retest?
> 
> I am not sure whether you are talking about the same thing. I think Borislav
> is talking about a POM like this one:

Sorry about the garbage; accidentally hit send. :-(

  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <configuration>
      <target>
        <artifact>
          <groupId>org.eclipse.recommenders.codesearch</groupId>
          <artifactId>luna</artifactId>
          <version>0.5.0-SNAPSHOT</version>
        </artifact>
      </target>
    </configuration>
  </plugin>

Now, if you use

  mvn org.eclipse.tycho:tycho-versions-plugin:0.20.0:set-version -DnewVersion=0.6.0-SNAPSHOT

to set the version of the luna artifact, the above plugin configuration (from the same reactor) is left untouched, even with Tycho 0.20.0 (just double-checked).
Comment 4 Robert Munteanu CLA 2014-06-24 08:21:04 EDT
Ah, ok. I did not see this because I use ${project.version} in my builds.
Comment 5 Andreas Sewe CLA 2014-06-24 09:05:47 EDT
(In reply to Robert Munteanu from comment #4)
> Ah, ok. I did not see this because I use ${project.version} in my builds.

Yes, in our case ${project.version} doesn't work as a workaround as that variable is expanded to the version of the child project, not the (different) version of the parent project (which configures the target-platform-configuration plugin).

But defining a targetVersion property in the parent and then setting that as well with set-version using -Dproperties=targetVersion is a good-enough workaround.
Comment 6 Eclipse Genie CLA 2017-04-01 18:45:37 EDT
New Gerrit change created: https://git.eclipse.org/r/94263
Comment 7 Jan Sievers CLA 2017-04-03 03:36:02 EDT
@Guillaume thanks for proposing a patch!
I will review as soon as I find some time but latest until end of this week
Comment 9 Jan Sievers CLA 2017-04-03 10:56:33 EDT
@Guillaume thanks for the patch!