Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 390119

Summary: branding plugins buildId aren't updated
Product: [Technology] CBI Reporter: Paul Webster <pwebster>
Component: prototypeAssignee: CBI Dummy user <cbi.prototype-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: andrea.ross, igor, jan.sievers, john.arthorne, thanh.ha
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 395932, 395933, 395934    
Bug Blocks: 372792    
Attachments:
Description Flags
buildid replacement patch
none
patch
none
jdt patch
none
pde patch
none
platform.common patch
none
platform patch
none
platform.releng patch
none
platform.resources patch
none
platform.runtime patch
none
platform.ua patch
none
jdt.patch v2
none
pde.ui.patch v2
none
platform.common.patch v2
none
platform.patch v2
none
platform.releng.patch v2
none
platform.resources.patch v2
none
platform.runtime.patch v2
none
platform.ua.patch v2
none
jdt.patch v3
none
pde.ui.patch v3
none
platform.common.patch v3
none
platform.patch v3
none
platform.releng.patch v3
none
platform.resources.patch v3
none
platform.runtime.patch v3
none
platform.ua.patch v3
none
platform.common.patch v4 none

Description Paul Webster CLA 2012-09-21 14:34:19 EDT
The branding plugins don't have their about.mappings updated with the build id (see org.eclipse.platform as an example).

cbi:
0=@build@

pde:
0=M20120909-2000

The second part of this is the qualifier for the branding plugin is not related to the current build, but a static qualifier.

PW
Comment 1 Paul Webster CLA 2012-09-28 13:37:57 EDT
This shows up in the Help>About dialog for all branded features.

PW
Comment 2 Thanh Ha CLA 2012-10-09 15:03:50 EDT
Created attachment 222079 [details]
buildid replacement patch

I took a first try at this issue by using the maven-antrun-plugin to replace @build@ with ${unqualifiedVersion}.${buildQualifier} which results in a buildid of "3.8.0.v20120523-1245". What should we use as the buildid?

Problem I see with this patch however is the token replace task modifies the about.mappings so the next time someone runs a build it won't replace the buildid unless they "git checkout about.mappings" to reset the file. Is there perhaps a better plugin for replacing tokens to use in this case?
Comment 3 Igor Fedorenko CLA 2012-10-09 15:21:50 EDT
Comment on attachment 222079 [details]
buildid replacement patch

As far as I can tell, buildid will be replaced in the source file, i.e. the file will appear as modified in "git status" after the build.
Comment 4 Paul Webster CLA 2012-10-10 13:56:29 EDT
Igor, is the other way to deal with this to write something in the maven-cbi-plugin that could copy that file into dir/target, replace the token, but still use it as the about.mappings resource?

PW
Comment 5 Igor Fedorenko CLA 2012-10-10 14:59:46 EDT
This would required code changes in tycho.
Comment 6 Jan Sievers CLA 2012-10-26 20:33:10 EDT
one way to do this would be with maven-resource-plugin:

	<properties>
	  <build>${unqualifiedVersion}.${buildQualifier}</build>
	</properties>  
  <build>
    <resources>
      <resource>
        <directory>.</directory>
        <filtering>true</filtering>
        <includes>
          <include>about.mappings</include>
        </includes>
      </resource>
    </resources>
  </build>

I verified this does the replacement in target/classes/about.mappings but unfortunately we can't include that via bin.includes in the jar. See tycho bug 362252
Comment 7 Jan Sievers CLA 2012-11-15 07:26:37 EST
Created attachment 223599 [details]
patch

this is kind of a hack but works without having to replace file content in-place
Comment 8 Thanh Ha CLA 2012-11-19 09:38:08 EST
Created attachment 223713 [details]
jdt patch
Comment 9 Thanh Ha CLA 2012-11-19 09:38:24 EST
Created attachment 223714 [details]
pde patch
Comment 10 Thanh Ha CLA 2012-11-19 09:38:40 EST
Created attachment 223715 [details]
platform.common patch
Comment 11 Thanh Ha CLA 2012-11-19 09:39:00 EST
Created attachment 223716 [details]
platform patch
Comment 12 Thanh Ha CLA 2012-11-19 09:39:16 EST
Created attachment 223717 [details]
platform.releng patch
Comment 13 Thanh Ha CLA 2012-11-19 09:39:31 EST
Created attachment 223718 [details]
platform.resources patch
Comment 14 Thanh Ha CLA 2012-11-19 09:39:53 EST
Created attachment 223719 [details]
platform.runtime patch
Comment 15 Thanh Ha CLA 2012-11-19 09:40:15 EST
Created attachment 223720 [details]
platform.ua patch
Comment 16 Thanh Ha CLA 2012-11-19 09:43:53 EST
I attached patches that use a profile "update-branding-plugins" which needs to be activated manually to trigger the build to update the about.mappings files. This patch is based on the original patch that used antrun to replace the token in about.mappings.
Comment 17 Thanh Ha CLA 2012-11-26 14:36:44 EST
Created attachment 223964 [details]
jdt.patch v2
Comment 18 Thanh Ha CLA 2012-11-26 14:37:11 EST
Created attachment 223965 [details]
pde.ui.patch v2
Comment 19 Thanh Ha CLA 2012-11-26 14:49:51 EST
Created attachment 223966 [details]
platform.common.patch v2
Comment 20 Thanh Ha CLA 2012-11-26 14:54:22 EST
Created attachment 223967 [details]
platform.patch v2
Comment 21 Thanh Ha CLA 2012-11-26 14:57:14 EST
Created attachment 223968 [details]
platform.releng.patch v2
Comment 22 Thanh Ha CLA 2012-11-26 14:58:38 EST
Created attachment 223969 [details]
platform.resources.patch v2
Comment 23 Thanh Ha CLA 2012-11-26 14:59:51 EST
Created attachment 223970 [details]
platform.runtime.patch v2
Comment 24 Thanh Ha CLA 2012-11-26 15:03:39 EST
Created attachment 223972 [details]
platform.ua.patch v2
Comment 25 Thanh Ha CLA 2012-11-26 15:05:44 EST
After discussing with Paul this morning. We decided that the @build@ variable should be replaced with the ${buildId} variable, the attached updated patches were modified to use ${buildId}.
Comment 26 Thanh Ha CLA 2012-11-26 20:07:20 EST
Created attachment 223987 [details]
jdt.patch v3
Comment 27 Thanh Ha CLA 2012-11-26 20:07:39 EST
Created attachment 223988 [details]
pde.ui.patch v3
Comment 28 Thanh Ha CLA 2012-11-26 20:08:12 EST
Created attachment 223989 [details]
platform.common.patch v3
Comment 29 Thanh Ha CLA 2012-11-26 20:08:44 EST
Created attachment 223990 [details]
platform.patch v3
Comment 30 Thanh Ha CLA 2012-11-26 20:09:10 EST
Created attachment 223991 [details]
platform.releng.patch v3
Comment 31 Thanh Ha CLA 2012-11-26 20:09:45 EST
Created attachment 223992 [details]
platform.resources.patch v3
Comment 32 Thanh Ha CLA 2012-11-26 20:10:19 EST
Created attachment 223993 [details]
platform.runtime.patch v3
Comment 33 Thanh Ha CLA 2012-11-26 20:10:45 EST
Created attachment 223994 [details]
platform.ua.patch v3
Comment 34 Paul Webster CLA 2012-11-28 10:41:00 EST
(In reply to comment #28)
> Created attachment 223989 [details]
> platform.common.patch v3

This one failed to apply to the latest R4_2_maintenance of eclipse.platform.common

PW
Comment 37 Thanh Ha CLA 2012-11-28 11:28:50 EST
Created attachment 224072 [details]
platform.common.patch v4

Updated patch to apply against latest R4_2_maintenance branch.
Comment 38 Paul Webster CLA 2012-11-28 11:31:25 EST
(In reply to comment #32)
> Created attachment 223993 [details]
> platform.runtime.patch v3

Released as http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?h=R4_2_maintenance&id=8bac5c35cf2b4c6162076bd6a203a72800721804

We didn't branch e.p.runtime for 3.8.x and John says this particular fix is not important enough for that.

PW
Comment 41 John Arthorne CLA 2013-01-02 16:33:51 EST
All of these patches have been applied. Is this one done?
Comment 42 Thanh Ha CLA 2013-01-07 10:05:54 EST
(In reply to comment #41)
> All of these patches have been applied. Is this one done?

Yes the patches have been applied. Setting this bug to resolved.