Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 461837 - Can't build OS X native launchers with maven
Summary: Can't build OS X native launchers with maven
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 4.5.0 Mars   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: Mars M7   Edit
Assignee: Pascal Rapicault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-10 11:27 EDT by Mikaël Barbero CLA
Modified: 2015-04-07 09:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikaël Barbero CLA 2015-03-10 11:27:57 EDT
(cross posting from equinox-dev after Pascal's advice ;))

While currently trying to build natives on the Eclipse FoundationiInfra (see cbi-dev ML for information and https://hudson.eclipse.org/cbi/view/natives/ for builds), I hit an issue with Mac native launchers.

Don't take the green status of https://hudson.eclipse.org/cbi/view/natives/job/cbi-launcher-macosx-x86_64/ for granted. It is actually failing. 

The issue is that features/org.eclipse.equinox.executable.feature/pom.xml starts features/org.eclipse.equinox.executable.feature/library/carbon/build.xml which itself starts features/org.eclipse.equinox.executable.feature/library/carbon/build.sh

build.sh takes arguments about the platform to build but build.xml does not set any.

pom.xml on the other hand defines the variable "native" as a string "ws.os.arch". So I updated build.xml to take these string and split it to be able to run build.sh accordingly. See my patch here https://git.eclipse.org/r/#/c/43538/. With this patch, I am able to properly build native launcher my local OS X with the command "mvn clean verify -P build-individual-bundles -Dnative=cocoa.macosx.x86_64 -f rt.equinox.framework/features/org.eclipse.equinox.executable.feature/pom.xml"

Another issue is with the "mvn clean". It was not triggering the "build.sh clean" in the end, so I update the  features/org.eclipse.equinox.executable.feature/pom.xml for that too (https://git.eclipse.org/r/#/c/43539/1).
Comment 1 David Williams CLA 2015-03-11 13:10:36 EDT
Thanks for the bug, and especially patches, but will need to be reviewed and committed by Equinox committer, so moving to their component. 

Thanks again,
Comment 2 Pascal Rapicault CLA 2015-03-12 14:18:28 EDT
There are many things that we need to stabilize for M6. So, if this is ok with you I'd like to commit this once after M6.
Comment 3 Mikaël Barbero CLA 2015-03-13 04:07:16 EDT
Sure, no problem.
Comment 4 David Williams CLA 2015-03-23 02:49:33 EDT
See also bug 383545 ... is the suggestion made there an alternative solution?
Comment 5 Mikaël Barbero CLA 2015-03-23 03:58:08 EDT
Not really. Bug 383545 is about the "cosmetic" renaming of the folder "carbon" to "cocoa" to better reflect that sources within this folder are about cocoa and not carbon. This would be very good, but not related to this bug which about wrong parameters (passed from maven to ant script to shell script) that prevents to build the natives from maven.
Comment 6 Pascal Rapicault CLA 2015-03-31 14:48:59 EDT
Gerrit request pushed.
Comment 7 David Williams CLA 2015-03-31 14:58:44 EDT
(In reply to Mikael Barbero from comment #5)
> Not really. Bug 383545 is about the "cosmetic" renaming of the folder
> "carbon" to "cocoa" to better reflect that sources within this folder are
> about cocoa and not carbon. This would be very good, but not related to this
> bug which about wrong parameters (passed from maven to ant script to shell
> script) that prevents to build the natives from maven.

Thanks. I'd still like to see bug 383545 fixed, as I think such so called "cosmetic" errors are what leads to "conceptual errors" in build scripts. 

Especially as "new people" get involved ... that have to re-learn the quirks and is thus a "barrier to entry".
Comment 8 Mikaël Barbero CLA 2015-04-07 09:29:02 EDT
(In reply to David Williams from comment #7)
> I'd still like to see bug 383545 fixed, as I think such so called
> "cosmetic" errors are what leads to "conceptual errors" in build scripts. 
> 
> Especially as "new people" get involved ... that have to re-learn the quirks
> and is thus a "barrier to entry".

FYI, I pushed two reviews for bug 383545:

https://git.eclipse.org/r/#/c/45375/
https://git.eclipse.org/r/#/c/45376/