-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpom.xml
More file actions
560 lines (522 loc) · 27.3 KB
/
pom.xml
File metadata and controls
560 lines (522 loc) · 27.3 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>org.devzendo</groupId>
<artifactId>transputer-emulator</artifactId>
<version>0.0.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Transputer Emulator</name>
<description>This is an emulator of the 32-bit Inmos T414/T800/T801/T805 Transputer family, and a Node Server that
interfaces it to a host OS, providing boot/debug/IO facilities.
(Apache License v2) 2005-2026 Matt Gumbley, DevZendo.org
</description>
<url>https://devzendo.github.io/parachute</url>
<organization>
<name>DevZendo.org</name>
<url>http://devzendo.org/</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/devzendo/transputer-emulator.git</url>
<connection>scm:git:https://github.com/devzendo/transputer-emulator.git</connection>
<developerConnection>scm:git:git@github.com:devzendo/transputer-emulator.git</developerConnection>
</scm>
<developers>
<developer>
<id>matt.gumbley</id>
<name>Matt Gumbley</name>
<email>matt.gumbley@devzendo.org</email>
</developer>
</developers>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<cmake.binary.dir>cmake-build-release</cmake.binary.dir>
<cmake.build.type>Release</cmake.build.type>
<download.cmake>false</download.cmake> <!-- old setting -->
<cmake.download>false</cmake.download> <!-- new setting -->
</properties>
<!-- use mvn enforcer:display-info to find platform name/family values -->
<!-- Ubuntu 24.04:
[INFO] Maven Version: 3.9.9
[INFO] JDK Version: 17.0.12 normalized as: 17.0.12
[INFO] Java Vendor: Ubuntu
[INFO] OS Info - Arch: amd64, Family: unix, Name: linux, Version: 6.8.0-41-generic
Debian 12 Raspberry Pi:
[INFO] Maven Version: 3.6.3
[INFO] JDK Version: 17.0.12 normalized as: 17.0.12
[INFO] Java Vendor: Debian
[INFO] OS Info - Arch: aarch64, Family: unix, Name: linux, Version: 6.6.20+rpt-rpi-v8
Mac OS Catalina:
[INFO] Maven Version: 3.9.9
[INFO] JDK Version: 17.0.12 normalized as: 17.0.12
[INFO] Java Vendor: Eclipse Adoptium
[INFO] OS Info - Arch: x86_64, Family: mac, Name: mac os x, Version: 10.15.7
Windows 10:
[INFO] Maven Version: 3.9.9
[INFO] JDK Version: 17.0.12 normalized as: 17.0.12
[INFO] Java Vendor: Eclipse Adoptium
[INFO] OS Info - Arch: amd64, Family: windows, Name: windows 10, Version: 10.0
-->
<profiles>
<!-- There are two main profiles, build and deploy.
build is used on each Jenkins agent to compile, link and assemble the OS-specific archive. Jenkins runs
this profile across all OS-varying agents, then archives the artifact. This is used by all the
'transputer-emulator-fast-<platform>' Jenkins projects.
deploy is used on the main Jenkins server. The main Jenkins job runs the build profile across all agents as
above, and then copies all artifacts from all agents (using the Copy Artifact Plugin) to the target folder.
Then the build helper plugin attaches these externally generated archive artifacts to the project,
they are then signed, and uploaded to nexus. This is used by the 'transputer-emulator-nodes' Jenkins
project.
This funk is since the behaviour of the nexus staging plugin differs in snapshot and release mode: all
snapshots are deployed to the same repo, but each release is deployed to its own - and I haven't managed
to work out how to get the snapshot behaviour on release.
There are also OS-specific profiles that activate on each OS-specific node.
-->
<profile>
<id>build</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<!-- Used to use ${cmake.binary.dir} but that doesn't clear out the 'debug' dir when
switching to 'release' and vice versa -->
<filesets>
<fileset>
<directory>cmake-build-debug</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>cmake-build-release</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- Generate the target/classes/version.cpp file that CMakeLists.txt picks up -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>default-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-maven-plugin</artifactId>
<version>3.26.3-b1</version>
<executions>
<!-- Generate the CMake cache/binary build dir -->
<execution>
<id>cmake-generate</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<sourcePath>${project.basedir}</sourcePath>
<targetPath>${project.basedir}/${cmake.binary.dir}</targetPath>
<generator>${cmake.generator}</generator>
<classifier>${cmake.classifier}</classifier>
<environmentVariables>
<CMAKE_BUILD_TYPE>${cmake.build.type}</CMAKE_BUILD_TYPE>
</environmentVariables>
<options>
<option>-D</option><option>${cmake.option}</option>
</options>
</configuration>
</execution>
<execution>
<id>cmake-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<target>all</target>
<!-- "targetPath" from the "generate" goal: -->
<projectDirectory>${project.basedir}/${cmake.binary.dir}</projectDirectory>
<classifier>${cmake.classifier}</classifier>
<options>
</options>
</configuration>
</execution>
<execution>
<id>cmake-test</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<!-- "buildDirectory" is "targetPath" from the "generate" goal -->
<buildDirectory>${project.basedir}/${cmake.binary.dir}</buildDirectory>
<options>
<option>--verbose</option>
</options>
<!-- Optional way to not fail the build on test failures -->
<!-- <testFailureIgnore>true</testFailureIgnore> -->
<!-- Optional way to skip just the ctest tests -->
<!-- <ctest.skip.tests>true</ctest.skip.tests> -->
<!-- Optional/standard way to skip all Maven tests -->
<!-- <maven.test.skip>true</maven.test.skip> -->
<!-- Optional way to configure number of threads tests should use -->
<!-- <threadCount>2</threadCount> -->
<!-- Optional dashboard configuration; used with CTestConfig.cmake -->
<!-- <dashboard>Experimental</dashboard> -->
</configuration>
</execution>
</executions>
</plugin>
<!-- For reasons I cannot fathom, the executable this runs on Windows exists but won't run. If you
package it, then unzip the package, it runs. Why does anyone use this toy 'OS'?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>which-platform</id>
<phase>process-classes</phase> Just after compiling, before testing
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>${cmake.binary.dir}/Emulator/temulate${binary.suffix}</executable>
<workingDirectory>${cmake.binary.dir}/Emulator</workingDirectory>
<arguments>
<argument>-p</argument>
</arguments>
<timeout>10000</timeout>
</configuration>
</plugin>
-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/${assembly.name}.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Prerequisite: Pi Pico tool chain and SDK are installed.
Define the -DCROSS=PICO property to maven to trigger this
cross compilation. This causes the string CROSS=PICO to
be passed to cmake generate by the options mechanism.
Cmake sees this as a 'cache variable', which can be
sensed in the CMakeLists.txt. -->
<id>pi-pico</id>
<activation>
<property>
<name>CROSS</name>
<value>PICO</value>
</property>
</activation>
<properties>
<!-- Use the apt-installed cmake: no need to set its path -->
<!-- One of the generators defined at https://cmake.org/cmake/help/v3.7/manual/cmake-generators.7.html -->
<cmake.generator>Unix Makefiles</cmake.generator>
<!-- The classifier of the current platform. One of [windows-x86_32, windows-x86_64, linux-x86_32, linux-x86_64, linux-arm_32, mac-x86_64]. -->
<cmake.classifier>linux-x86_64</cmake.classifier>
<install.dir>/opt/parachute</install.dir>
<binary.suffix></binary.suffix>
<assembly.name>pi-pico-distribution</assembly.name>
<cmake.option>CROSS=PICO</cmake.option>
</properties>
<build>
</build>
</profile>
<profile>
<id>linux-amd64</id>
<activation>
<os>
<name>linux</name>
<arch>amd64</arch>
</os>
<property>
<name>!CROSS</name>
</property>
</activation>
<properties>
<!-- Use the apt-installed cmake: no need to set its path -->
<!-- One of the generators defined at https://cmake.org/cmake/help/v3.7/manual/cmake-generators.7.html -->
<cmake.generator>Unix Makefiles</cmake.generator>
<!-- The classifier of the current platform. One of [windows-x86_32, windows-x86_64, linux-x86_32, linux-x86_64, linux-arm_32, mac-x86_64]. -->
<cmake.classifier>linux-x86_64</cmake.classifier>
<install.dir>/opt/parachute</install.dir>
<binary.suffix></binary.suffix>
<assembly.name>linux-distribution</assembly.name>
<!-- This isn't being sensed in CMakeLists.txt but there has to be some option -->
<cmake.option>NOCROSS=true</cmake.option>
</properties>
<build>
</build>
</profile>
<profile>
<id>linux-arm</id>
<activation>
<os>
<name>linux</name>
<arch>arm</arch>
</os>
</activation>
<properties>
<!-- Use the apt-installed cmake: no need to set its path -->
<!-- One of the generators defined at https://cmake.org/cmake/help/v3.7/manual/cmake-generators.7.html -->
<cmake.generator>Unix Makefiles</cmake.generator>
<!-- The classifier of the current platform. One of [windows-x86_32, windows-x86_64, linux-x86_32, linux-x86_64, linux-arm_32, mac-x86_64]. -->
<cmake.classifier>linux-arm_32</cmake.classifier>
<install.dir>/opt/parachute</install.dir>
<binary.suffix></binary.suffix>
<assembly.name>linux-distribution</assembly.name>
<!-- This isn't being sensed in CMakeLists.txt but there has to be some option -->
<cmake.option>NOCROSS=true</cmake.option>
</properties>
<build>
</build>
</profile>
<profile>
<id>linux-aarch64</id>
<activation>
<os>
<name>linux</name>
<arch>aarch64</arch>
</os>
</activation>
<properties>
<!-- Use the apt-installed cmake: no need to set its path -->
<!-- One of the generators defined at https://cmake.org/cmake/help/v3.7/manual/cmake-generators.7.html -->
<cmake.generator>Unix Makefiles</cmake.generator>
<!-- The classifier of the current platform. One of [windows-x86_32, windows-x86_64, linux-x86_32, linux-x86_64, linux-arm_32, mac-x86_64]. -->
<cmake.classifier>linux-aarch_64</cmake.classifier>
<install.dir>/opt/parachute</install.dir>
<binary.suffix></binary.suffix>
<assembly.name>linux-distribution</assembly.name>
<!-- This isn't being sensed in CMakeLists.txt but there has to be some option -->
<cmake.option>NOCROSS=true</cmake.option>
</properties>
<build>
</build>
</profile>
<profile>
<id>macosx</id>
<activation>
<os>
<name>mac os x</name>
</os>
<!-- The main PICO build is done on Ubuntu, but allow it on macOS too -->
<property>
<name>!CROSS</name>
</property>
</activation>
<properties>
<!-- Use the macports-installed cmake or a manual install on the path: no need to set its path -->
<!-- These are two of my properties I pass in to the CMake plugin, they're not known by the plugin innately -->
<!-- One of the generators defined at https://cmake.org/cmake/help/v3.7/manual/cmake-generators.7.html -->
<cmake.generator>Unix Makefiles</cmake.generator>
<!-- The classifier of the current platform. One of [windows-x86_32, windows-x86_64, linux-x86_32, linux-x86_64, linux-arm_32, mac-x86_64]. -->
<cmake.classifier>mac-x86_64</cmake.classifier>
<install.dir>/opt/parachute</install.dir>
<binary.suffix></binary.suffix>
<assembly.name>macosx-distribution</assembly.name>
<!-- This isn't being sensed in CMakeLists.txt but there has to be some option -->
<cmake.option>NOCROSS=true</cmake.option>
</properties>
<build>
</build>
</profile>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<!-- The CMake maven plugin understands cmake.root.dir -->
<cmake.root.dir>C:/Program Files/CMake</cmake.root.dir>
<!-- These are two of my properties I pass in to the CMake plugin, they're not known by the plugin innately -->
<!-- One of the generators defined at https://cmake.org/cmake/help/v3.7/manual/cmake-generators.7.html -->
<cmake.generator>NMake Makefiles</cmake.generator>
<!-- The classifier of the current platform. One of [windows-x86_32, windows-x86_64, linux-x86_32, linux-x86_64, linux-arm_32, mac-x86_64]. -->
<cmake.classifier>windows-x86_64</cmake.classifier>
<install.dir>C:/parachute</install.dir>
<binary.suffix>.exe</binary.suffix>
<assembly.name>windows-distribution</assembly.name>
<!-- This isn't being sensed in CMakeLists.txt but there has to be some option -->
<cmake.option>NOCROSS=true</cmake.option>
</properties>
<build>
</build>
</profile>
<profile>
<id>local-install</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>copy-scripts-and-config</id>
<phase>prepare-package</phase>
<configuration>
<target>
<mkdir dir="${install.dir}"/>
<mkdir dir="${install.dir}/bin"/>
<copy file="${cmake.binary.dir}/Emulator/temulate${binary.suffix}"
todir="${install.dir}/bin"/>
<chmod file="${install.dir}/bin/temulate${binary.suffix}" perm="755" />
<copy file="${cmake.binary.dir}/IServer/server/iserver${binary.suffix}"
todir="${install.dir}/bin"/>
<chmod file="${install.dir}/bin/iserver${binary.suffix}" perm="755" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-centos-7-linux-x86_64.tar.gz</file>
<type>tar.gz</type>
<classifier>centos-7-linux-x86_64</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-mac-x86_64.tar.gz</file>
<type>tar.gz</type>
<classifier>mac-x86_64</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-raspbian-9-linux-arm_32.tar.gz</file>
<type>tar.gz</type>
<classifier>raspbian-9-linux-arm_32</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-ubuntu-16.04-linux-x86_64.tar.gz</file>
<type>tar.gz</type>
<classifier>ubuntu-16.04-linux-x86_64</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-ubuntu-18.04-linux-x86_64.tar.gz</file>
<type>tar.gz</type>
<classifier>ubuntu-18.04-linux-x86_64</classifier>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-windows-x86_64.zip</file>
<type>zip</type>
<classifier>windows-x86_64</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<executable>gpg2</executable>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.1</version>
</extension>
</extensions>
</build>
</project>