-
Notifications
You must be signed in to change notification settings - Fork 195
Expand file tree
/
Copy pathpom.xml
More file actions
242 lines (236 loc) · 8.66 KB
/
pom.xml
File metadata and controls
242 lines (236 loc) · 8.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<?xml version="1.0" encoding="UTF-8"?>
<!--
###############################################################################
# Copyright (c) 2024, 2024 Hannes Wellmann and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Hannes Wellmann - initial API and implementation
###############################################################################
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.platform</groupId>
<artifactId>eclipse.platform.swt</artifactId>
<version>4.38.0-SNAPSHOT</version>
</parent>
<artifactId>eclipse.platform.swt.binaries</artifactId>
<packaging>pom</packaging>
<properties>
<buildid>${buildId}</buildid>
<maven.compiler.release>17</maven.compiler.release>
<swtMainProject>${project.basedir}/../../bundles/org.eclipse.swt</swtMainProject>
</properties>
<modules>
<module>org.eclipse.swt.cocoa.macosx.x86_64</module>
<module>org.eclipse.swt.cocoa.macosx.aarch64</module>
<module>org.eclipse.swt.gtk.linux.aarch64</module>
<module>org.eclipse.swt.gtk.linux.ppc64le</module>
<module>org.eclipse.swt.gtk.linux.riscv64</module>
<module>org.eclipse.swt.gtk.linux.x86_64</module>
<module>org.eclipse.swt.win32.win32.aarch64</module>
<module>org.eclipse.swt.win32.win32.x86_64</module>
<module>org.eclipse.swt.headless</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>${surefire.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>execute-tests</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-apitools-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<addSourceFolders>true</addSourceFolders>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<configuration>
<timestampProvider>fragment-host</timestampProvider>
<archive>
<manifestEntries>
<Eclipse-Version>${releaseNumberSDK}</Eclipse-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<tags combine.children="append">
<tag>
<name>field</name>
<placement>f</placement>
<head>Native code field</head>
</tag>
<tag>
<name>method</name>
<placement>m</placement>
<head>Native code method</head>
</tag>
</tags>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>build-native-fragment</id>
<activation>
<file><!-- Only build the native fragment projects in this directory -->
<exists>META-INF/MANIFEST.MF</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<executionEnvironment>JavaSE-${maven.compiler.release}</executionEnvironment>
<dependency-resolution>
<profileProperties>
<!-- set property so that the filter condition on the p2 dependencies from org.eclipse.swt to the fragments does not match -->
<org.eclipse.swt.buildtime>true</org.eclipse.swt.buildtime>
</profileProperties>
</dependency-resolution>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>build-native-binaries</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- See https://stackoverflow.com/a/53227117 and http://ant-contrib.sourceforge.net/tasks/tasks/index.html -->
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<if><equals arg1="${native}" arg2="${ws}.${os}.${arch}"/>
<then>
<property name="build_dir" value="${project.build.directory}/natives-build-temp"/>
<exec executable="${java.home}/bin/java" dir="${swtMainProject}" failonerror="true">
<arg line="-Dws=${ws} -Darch=${arch} build-scripts/CollectSources.java -nativeSources '${build_dir}'"/>
</exec>
<property name="SWT_JAVA_HOME" value="${java.home}"/><!-- Not overwritten if already set, e.g. as CLI argument -->
<echo>Compile SWT natives against headers and libraries from JDK: ${SWT_JAVA_HOME}</echo>
<if><equals arg1="${ws}" arg2="win32" />
<then>
<exec dir="${build_dir}" executable="${build_dir}/build.bat" failonerror="true">
<env key="SWT_JAVA_HOME" value="${SWT_JAVA_HOME}"/>
<env key="OUTPUT_DIR" value="${project.basedir}"/>
<arg line="install clean"/>
</exec>
</then>
<else>
<exec dir="${build_dir}" executable="sh" failonerror="true">
<arg line="build.sh"/>
<env key="SWT_JAVA_HOME" value="${SWT_JAVA_HOME}"/>
<env key="OUTPUT_DIR" value="${project.basedir}"/>
<env key="MODEL" value="${arch}"/>
<arg line="install clean"/>
</exec>
</else>
</if>
</then>
</if>
</target>
</configuration>
</execution>
<execution>
<id>prepare-translation-files</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Prepare translationfiles for inclusion by renaming '*._properties' to '*.properties' -->
<move todir="${project.build.outputDirectory}" failonerror="true" preservelastmodified="true">
<fileset dir="${project.build.outputDirectory}" includes="**/*._properties"/>
<mapper type="glob" from="*._properties" to="*.properties" />
</move>
</target>
</configuration>
</execution>
<execution>
<id>package-swt-download-zip</id>
<!-- Pack this zip after the swt.jar has been signed.-->
<phase>verify</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<property name="temp.folder" value="${project.build.directory}/swtdownload-temp" />
<mkdir dir="${temp.folder}/swtdownload/" />
<!-- Prepare nested swt.jar and src.jar -->
<property name="mavenBuiltJarName" value="${project.build.directory}/org.eclipse.swt.${ws}.${os}.${arch}-${project.version}" />
<copy file="${mavenBuiltJarName}.jar" tofile="${temp.folder}/swtdownload/swt.jar"/>
<zip zipfile="${temp.folder}/swtdownload/src.zip" duplicate="preserve">
<zipfileset src="${mavenBuiltJarName}-sources.jar" includes="**/*.sh" filemode="755"/>
<zipfileset src="${mavenBuiltJarName}-sources.jar" excludes="META-INF/**,OSGI-INF/**" />
</zip>
<!--Assemple nested SWT-zip -->
<zip zipfile="${project.build.directory}/swt-${buildid}-${ws}-${os}-${arch}.zip">
<fileset dir="${temp.folder}/swtdownload/" />
<fileset dir="${swtMainProject}/build/" />
<fileset dir="." includes="about.html,about_files/" />
</zip>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.15</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>