Skip to content

Commit 1b7db3a

Browse files
committed
JAVA-3082: fix maven compile + test steps on apple-silicon
pom.xml: - add apple-silicon-dev profile which switches netty-tcnative for netty-tcnative-boringssl-static and updates to newer jffi (only at build-time, reference links in pom.xml) - upgrade animal-sniffer plugin to 1.16 to address error IllegalArgumentException during check-jdk6 step (see mojohaus/animal-sniffer#29)
1 parent c3ee3f1 commit 1b7db3a

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

driver-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
<dependency>
127127
<groupId>io.netty</groupId>
128-
<artifactId>netty-tcnative</artifactId>
128+
<artifactId>${netty-tcnative.artifact}</artifactId>
129129
<classifier>${os.detected.classifier}</classifier>
130130
<scope>test</scope>
131131
</dependency>

pom.xml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<slf4j-log4j12.version>1.7.25</slf4j-log4j12.version>
5353
<guava.version>19.0</guava.version>
5454
<netty.version>4.1.77.Final</netty.version>
55+
<netty-tcnative.artifact>netty-tcnative</netty-tcnative.artifact>
5556
<netty-tcnative.version>2.0.52.Final</netty-tcnative.version>
5657
<metrics.version>3.2.2</metrics.version>
5758
<snappy.version>1.1.2.6</snappy.version>
@@ -350,7 +351,7 @@
350351

351352
<dependency>
352353
<groupId>io.netty</groupId>
353-
<artifactId>netty-tcnative</artifactId>
354+
<artifactId>${netty-tcnative.artifact}</artifactId>
354355
<version>${netty-tcnative.version}</version>
355356
<classifier>${os.detected.classifier}</classifier>
356357
</dependency>
@@ -717,7 +718,7 @@ limitations under the License.
717718
<plugin>
718719
<groupId>org.codehaus.mojo</groupId>
719720
<artifactId>animal-sniffer-maven-plugin</artifactId>
720-
<version>1.15</version>
721+
<version>1.16</version>
721722
<executions>
722723
<execution>
723724
<id>check-jdk6</id>
@@ -1125,6 +1126,24 @@ limitations under the License.
11251126
<test.osgi.skip>true</test.osgi.skip>
11261127
</properties>
11271128
</profile>
1129+
1130+
<profile>
1131+
<id>apple-silicon-dev</id>
1132+
<activation>
1133+
<os>
1134+
<name>mac os x</name>
1135+
<family>mac</family>
1136+
<arch>aarch64</arch>
1137+
</os>
1138+
</activation>
1139+
<properties>
1140+
<!-- https://netty.io/wiki/forked-tomcat-native.html netty on apple-silicon requires the boringssl variant of tc-native -->
1141+
<netty-tcnative.artifact>netty-tcnative-boringssl-static</netty-tcnative.artifact>
1142+
<!-- https://github.com/jnr/jffi/pull/116 apple-silicon requires signed jffi binaries, added in 1.3.8 (jnr-ffi 2.2.10+) -->
1143+
<jnr-ffi.version>2.2.10</jnr-ffi.version>
1144+
</properties>
1145+
1146+
</profile>
11281147
</profiles>
11291148

11301149
<distributionManagement>

0 commit comments

Comments
 (0)