[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-dev] reference swt in a maven build
|
Hi,
I am using this definitions in my standalone SWT/JFace apps:
Parent pom.xml:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.jface</artifactId>
<version>3.22.100</version>
<exclusions>
<!--
https://stackoverflow.com/questions/52742653/swt-libraries-cannot-be-resolved
-->
<exclusion>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>3.116.0</version>
<exclusions>
<!--
https://stackoverflow.com/questions/52742653/swt-libraries-cannot-be-resolved
-->
<exclusion>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>
<version>3.116.0</version>
<exclusions>
<!--
https://stackoverflow.com/questions/52742653/swt-libraries-cannot-be-resolved
-->
<exclusion>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.gtk.linux.aarch64</artifactId>
<version>3.116.0</version>
<exclusions>
<!--
https://stackoverflow.com/questions/52742653/swt-libraries-cannot-be-resolved
-->
<exclusion>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.cocoa.macosx.x86_64</artifactId>
<version>3.116.0</version>
<exclusions>
<!--
https://stackoverflow.com/questions/52742653/swt-libraries-cannot-be-resolved
-->
<exclusion>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
Application pom.xml:
<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
</dependency>
</dependencies>
<modules>
</modules>
</profile>
<profile>
<id>linux-amd64</id>
<activation>
<os>
<name>Linux</name>
<arch>amd64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>
</dependency>
</dependencies>
<modules>
</modules>
</profile>
<profile>
<id>mac</id>
<activation>
<os>
<family>mac</family>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.swt.cocoa.macosx.x86_64</artifactId>
</dependency>
</dependencies>
<modules>
</modules>
</profile>
</profiles>
I am developing using Eclipse JEE on Windows, Linux (Ubuntu) and MacOS.
I do not know if this is the recommended way, but it works fine
Regards
Stefan
Am 22.06.2021 um 09:47 schrieb Christoph Läubrich:
I need to reference swt in a maven build (not an eclipse product!) as
a standalone dependency.
What is the recommended way to reference swt in maven so it could be
build on linux/windows/...
I could think about creating a profile for each os as mentioned in [1]
and define appropriate 'osgi.platform' properties but wondering if swt
offers something less manual or can I include some kind of swt-pom
that already does all the magic?
[1]
https://stackoverflow.com/questions/19023109/values-for-os-family-in-maven-profile-activation-condition
_______________________________________________
platform-dev mailing list
platform-dev@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/platform-dev