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

Bug 390020

Summary: Create the swt-<buildId>-gtk-linux-x86.zip files
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, gheorghe, Silenio_Quarti, thanh.ha
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 372792    
Attachments:
Description Flags
swtdownload patch
none
swtdownload patch v2
none
eclipse-parent.patch to set datetime format
none
swtdownload patch v3 none

Description Paul Webster CLA 2012-09-20 10:24:47 EDT
When SWT is built with PDE, it calls http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/buildFragment.xml that includes the swtdownload target for each fragment to create the corresponding swt-<buildId>-gtk-linux-x86.zip file.  This can be imported into a workspace as an eclipse project.

We need that translated into maven magic to produce those zips.

PW
Comment 1 Thanh Ha CLA 2012-10-12 15:34:49 EDT
Created attachment 222249 [details]
swtdownload patch

I gave a try at getting maven to produce the swt-<buildid>-<arch>.zip files and was able to get it building the zip.

There's 2 issues with this patch though.

1. I'm not sure what to set <buildid> to. I tried to set it to Tycho variables ${unqualifiedVersion}.${buildQualifier} but it looks like the variables aren't set at this point in time and the literal strings are set instead.

2. It doesn't look like Tycho picks up the zip files that are produced. antrun places the zips in the project directory and does not show up in the /target directory. I'm not sure what else needs to be done for Tycho to pick this up.
Comment 2 Paul Webster CLA 2012-10-15 08:57:03 EDT
(In reply to comment #1)
> There's 2 issues with this patch though.
> 
> 1. I'm not sure what to set <buildid> to. I tried to set it to Tycho
> variables ${unqualifiedVersion}.${buildQualifier} but it looks like the
> variables aren't set at this point in time and the literal strings are set
> instead.

Is this something we need to derive in our eclipse-parent pom?  Either auto-generate buildId to 'I'YYYYMMDD-hhmm and allow it to be overridden by passing in the property buildId?


> 
> 2. It doesn't look like Tycho picks up the zip files that are produced.
> antrun places the zips in the project directory and does not show up in the
> /target directory. I'm not sure what else needs to be done for Tycho to pick
> this up.

Maybe just a step that moves the built zips into the target directory?

PW
Comment 3 Thanh Ha CLA 2012-11-02 12:59:43 EDT
Created attachment 223122 [details]
swtdownload patch v2

This patch sets the buildid to 'I'YYYYMMDD-hhmm and can be overridden by passing "-Dbuild.id=I20121102-1200" as a parameter for example.

The produced zip files are also now moved into the target directory via antrun move task.
Comment 4 Thanh Ha CLA 2012-11-02 13:02:23 EDT
Created attachment 223123 [details]
eclipse-parent.patch to set datetime format

Attached patch sets the datetime format of ${maven.build.timestamp} used by the swtdownload patch.
Comment 5 Paul Webster CLA 2012-11-22 16:48:18 EST
(In reply to comment #4)
> Created attachment 223123 [details]
> eclipse-parent.patch to set datetime format
> 
> Attached patch sets the datetime format of ${maven.build.timestamp} used by
> the swtdownload patch.

I've just applied this anyway.

PW
Comment 6 Paul Webster CLA 2012-11-22 16:50:04 EST
Created attachment 223893 [details]
swtdownload patch v3

Slight update to pick up the global buildId.

Seems to have difficulty if the swt.binaries repo is not clean before it is run, but that's the regular build state so it should be OK

PW
Comment 7 Bogdan Gheorghe CLA 2012-11-22 16:59:08 EST
Released to R4_2_maintenance.
Comment 8 Bogdan Gheorghe CLA 2012-11-22 17:00:37 EST
... and R3_8_maintenance.