Add Maven launch-config to build native binaries of running platform #991
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the SWT maven build local building of the native binaries can be activated by setting the system property
native
to${ws}.${os}.${arch}
.Consequently the full command for a complete Maven build of SWT that also builds the natives is (with the SWT-repo root as working directory):
mvn clean verify -Dnative=${ws}.${os}.${arch}
This full build takes a few minutes and if one skips the test execution, by appending
-DskipTests
, the complete build terminates earlier.The fastest way to build the native binaries for a platform with Maven is to only run the execution of the
maven-antrun-plugin
that contains the local natives build. On the CLI this would be (with the SWT-repo root as working directory):mvn clean antrun:run@build-native-binaries -f binaries/org.eclipse.swt.${ws}.${os}.${arch} -Dnative=${ws}.${os}.${arch}
This PR adds a Maven launch configuration (requires Eclipse m2e) to the
org.eclipse.swt
project to perform such native binaries only build for the currently running platform. The launch-config uses the latter Maven command and infers the${ws}
,${os}
and${arch}
placeholder using the launch variables${target.ws}
,${target.os}
and${target.arch}
. With that one can just build the natives without further configuration after the necessary prerequisites are installed as described in the corresponding articles in https://www.eclipse.org/swt/docs.php.