-
Notifications
You must be signed in to change notification settings - Fork 11
/
pom.xml
500 lines (457 loc) · 21.4 KB
/
pom.xml
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
<?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>us.hebi.quickbuf</groupId>
<artifactId>quickbuf-parent</artifactId>
<packaging>pom</packaging>
<version>1.4.1-SNAPSHOT</version>
<name>QuickBuffers</name>
<url>https://github.com/HebiRobotics/QuickBuffers</url>
<description>
Java library for reading and writing Google's Protocol Buffers v2 messages
</description>
<organization>
<name>HEBI Robotics</name>
<url>http://www.hebirobotics.com</url>
</organization>
<inceptionYear>2019</inceptionYear>
<!-- Required: license information: -->
<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>
<!-- Required: source control information: -->
<scm>
<url>https://github.com/HebiRobotics/QuickBuffers</url>
<connection>scm:git:git://github.com/HebiRobotics/QuickBuffers.git</connection>
<developerConnection>scm:git:[email protected]:HebiRobotics/QuickBuffers.git</developerConnection>
<tag>HEAD</tag>
</scm>
<!-- Maven Central Distribution -->
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<!-- Required: developer information: -->
<developers>
<developer>
<id>ennerf</id>
<name>Florian Enner</name>
<email>[email protected]</email>
<url>https://github.com/ennerf</url>
<organization>HEBI Robotics</organization>
<organizationUrl>https://github.com/HebiRobotics</organizationUrl>
</developer>
</developers>
<modules>
<module>protoc-gen-request</module>
<module>protoc-gen-quickbuf</module>
<module>quickbuf-runtime</module>
<module>quickbuf-compat</module>
<module>conformance</module>
<module>benchmarks</module>
</modules>
<properties>
<!-- Default Java configuration -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.testSource>8</maven.compiler.testSource>
<maven.compiler.testTarget>8</maven.compiler.testTarget>
<!-- Common directories/plugins -->
<proto.dir>${project.basedir}/../quickbuf-runtime/src/test/resources/protos</proto.dir>
<protoc.pluginExt><!-- empty for macOS/linux --></protoc.pluginExt>
<protoc.requestPlugin>${project.basedir}/../protoc-gen-request/target/protoc-gen-request${protoc.pluginExt}</protoc.requestPlugin>
<protoc.quickbufPlugin>${project.basedir}/../protoc-gen-quickbuf/target/protoc-gen-quickbuf${protoc.pluginExt}</protoc.quickbufPlugin>
<scriptsDir>${project.basedir}/../protoc-gen-quickbuf/src/main/scripts</scriptsDir>
<!-- Default settings -->
<protobuf.version>3.21.12</protobuf.version>
<protoc.jar.version>3.11.4</protoc.jar.version>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<graalvm.tools.version>0.9.27</graalvm.tools.version>
<native.staticArg>--static</native.staticArg>
<native.extension>.exe</native.extension>
<protoc.os>determined-via-profile</protoc.os>
<protoc.arch>x86_64</protoc.arch>
<!-- Common defines that are used here, but maybe set by modules -->
<protocPluginName>${project.artifactId}</protocPluginName>
<finalName>${protocPluginName}-${project.version}</finalName>
<shadedName>${finalName}-shaded</shadedName>
<javaModuleName /> <!-- Jigsaw module name -->
<gpg.keyname /> <!-- set via settings.xml to sign release artifacts-->
<mainClass /> <!-- executable main -->
<!-- License Headers (http://www.mojohaus.org/license-maven-plugin/update-file-header-mojo.html) -->
<license.licenseName>apache_v2</license.licenseName>
<license.addJavaLicenseAfterPackage>false</license.addJavaLicenseAfterPackage>
<license.trimHeaderLine>true</license.trimHeaderLine>
<license.excludes>**/*.json,**/*.xml,**/*.sh,**/*.bat</license.excludes>
<!-- For now, disable 'missing' warnings about undocumented @param and @throws -->
<doclint>html,syntax,accessibility,reference</doclint>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.13.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-javalite</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.squareup</groupId>
<artifactId>javapoet</artifactId>
<version>1.13.0</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.21</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.21</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jol</groupId>
<artifactId>jol-core</artifactId>
<version>0.9</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<!-- Common plugin configurations -->
<pluginManagement>
<plugins>
<!-- Shade plugins as uber-jars, so we can call them without dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedArtifactId>${project.artifactId}</shadedArtifactId>
<minimizeJar>true</minimizeJar>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${mainClass}</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- Add scripts that call the uber-jar and look like a protoc plugin -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-plugin-scripts</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath"/>
<if>
<available file="${project.build.directory}/${shadedName}.jar"/>
<then>
<!-- Windows Script-->
<mkdir dir="target"/>
<copy file="${scriptsDir}/windows.bat" tofile="${project.build.directory}/${protocPluginName}.bat"/>
<replace file="${project.build.directory}/${protocPluginName}.bat" token="{jarfile}" value="${shadedName}"/>
<fixcrlf file="${project.build.directory}/${protocPluginName}.bat" eol="dos"/>
<!-- Unix Script -->
<copy file="${scriptsDir}/unix.sh" tofile="${project.build.directory}/${protocPluginName}"/>
<replace file="${project.build.directory}/${protocPluginName}" token="{jarfile}" value="${shadedName}"/>
<fixcrlf file="${project.build.directory}/${protocPluginName}" eol="unix"/>
<chmod file="${project.build.directory}/${protocPluginName}" perm="775" type="file"/>
<!-- Fix executable permissions of native executables:
The native executables are built on different CI systems and then placed in
the projects before building, and we need to ensure executable bits before
packaging them with Conveyor. It's a bit of an odd place to place this with the
scripts, but it seems like a waste to create a whole new task configuration for
one line. -->
<chmod dir="${project.build.directory}" perm="775" includes="**/*.exe"/>
</then>
</if>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<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>
<!-- Create a native image of the shaded uber-jar -->
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${graalvm.tools.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<skip>false</skip>
<skipNativeTests>true</skipNativeTests> <!-- TODO: change to junit platform >5.8 -->
<useArgFile>false</useArgFile>
<imageName>${finalName}-${protoc.os}-${protoc.arch}${native.extension}</imageName>
<classpath>
<param>${project.build.directory}/${shadedName}.jar</param>
</classpath>
<buildArgs>
<arg>-march=compatibility</arg> <!-- support older processors (see #54) -->
<arg>--no-fallback</arg>
<arg>--verbose</arg>
<arg>${native.staticArg}</arg>
</buildArgs>
</configuration>
</plugin>
<!-- Add native image executables as project artifacts. Can't be shared here because runtime uses the same plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
</plugin>
</plugins>
</pluginManagement>
<!-- Plugins that run for all modules -->
<plugins>
<!-- Add licenses to files -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.0</version>
<executions>
<execution>
<id>first</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
<!-- Optional: ensure the manifest contains artifact version information: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Automatic-Module-Name>${javaModuleName}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!-- Other plugins required for publishing to Maven Central -->
<profile>
<id>release</id>
<build>
<plugins>
<!-- Required: Source Jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Required: Javadoc Jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Required: Sign Artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.keyname}</passphraseServerId>
<gpgArguments>
<!-- Prevent gpg from using pinentry programs -->
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Deploy selected modules -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<!-- Nexus Staging -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>${autoReleaseAfterClose}</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- OS specific properties -->
<profile>
<id>platform-windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<protoc.pluginExt>.bat</protoc.pluginExt>
<protoc.os>windows</protoc.os>
<native.extension><!-- added automatically --></native.extension>
</properties>
</profile>
<profile>
<id>platform-linux</id>
<activation>
<os>
<name>linux</name>
</os>
</activation>
<properties>
<protoc.os>linux</protoc.os>
</properties>
</profile>
<profile>
<id>platform-osx</id>
<activation>
<os>
<name>mac os x</name>
</os>
</activation>
<properties>
<protoc.os>osx</protoc.os>
<native.staticArg>--verbose</native.staticArg> <!-- unsupported on osx -->
</properties>
</profile>
<profile>
<id>arch-aarch64</id>
<activation>
<os>
<arch>aarch64</arch>
</os>
</activation>
<properties>
<protoc.arch>aarch_64</protoc.arch>
</properties>
</profile>
<!-- uses the generated native generator -->
<profile>
<id>useNative</id>
<properties>
<protoc.pluginExt>-${project.version}-${protoc.os}-${protoc.arch}.exe</protoc.pluginExt>
</properties>
</profile>
</profiles>
</project>