Skip to content

Commit

Permalink
build(arch): use build arch profiles for native dependency classifica…
Browse files Browse the repository at this point in the history
…tion (#371)
  • Loading branch information
andrewazores authored Apr 15, 2024
1 parent 28c6c9c commit 7cce795
Showing 1 changed file with 91 additions and 10 deletions.
101 changes: 91 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<build.os>linux</build.os>
<build.arch>amd64</build.arch>

<io.cryostat.core.version>2.30.1</io.cryostat.core.version>

<org.apache.commons.codec.version>1.16.1</org.apache.commons.codec.version>
Expand All @@ -31,6 +34,7 @@
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.2.9.Final</quarkus.platform.version>
<quarkus-quinoa.version>2.3.6</quarkus-quinoa.version>
<io.netty.version>4.1.101.Final</io.netty.version>
<org.codehaus.mojo.build.helper.plugin.version>3.5.0</org.codehaus.mojo.build.helper.plugin.version>

<com.github.spotbugs.version>4.8.4</com.github.spotbugs.version>
Expand All @@ -45,6 +49,13 @@
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>${io.netty.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
Expand Down Expand Up @@ -190,16 +201,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-quartz</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<classifier>osx-x86_64</classifier>
</dependency>
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
Expand Down Expand Up @@ -421,5 +422,85 @@
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>

<profile>
<id>default-arch</id>
<activation>
<property>
<name>!build.arch</name>
</property>
</activation>
<properties>
<io.netty.netty-transport-native-epoll.classifier>${build.os}-x86_64</io.netty.netty-transport-native-epoll.classifier>
<io.netty.netty-transport-native-epoll.scope>compile</io.netty.netty-transport-native-epoll.scope>
</properties>
</profile>
<profile>
<id>amd64</id>
<activation>
<property>
<name>build.arch</name>
<value>amd64</value>
</property>
</activation>
<properties>
<io.netty.netty-transport-native-epoll.classifier>${build.os}-x86_64</io.netty.netty-transport-native-epoll.classifier>
<io.netty.netty-transport-native-epoll.scope>compile</io.netty.netty-transport-native-epoll.scope>
</properties>
</profile>
<profile>
<id>arm64</id>
<activation>
<property>
<name>build.arch</name>
<value>arm64</value>
</property>
</activation>
<properties>
<io.netty.netty-transport-native-epoll.classifier>${build.os}-aarch_64</io.netty.netty-transport-native-epoll.classifier>
<io.netty.netty-transport-native-epoll.scope>compile</io.netty.netty-transport-native-epoll.scope>
</properties>
</profile>
<profile>
<id>with-epoll</id>
<activation>
<property>
<name>!build.exclude-epoll</name>
</property>
</activation>
<properties>
<io.netty.netty-transport-native-epoll.scope>compile</io.netty.netty-transport-native-epoll.scope>
</properties>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${io.netty.version}</version>
<classifier>${io.netty.netty-transport-native-epoll.classifier}</classifier>
<scope>${io.netty.netty-transport-native-epoll.scope}</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>no-epoll</id>
<activation>
<property>
<name>build.exclude-epoll</name>
</property>
</activation>
<properties>
<io.netty.netty-transport-native-epoll.classifier>${build.os}-x86_64</io.netty.netty-transport-native-epoll.classifier>
<io.netty.netty-transport-native-epoll.scope>provided</io.netty.netty-transport-native-epoll.scope>
</properties>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>${io.netty.netty-transport-native-epoll.classifier}</classifier>
<scope>${io.netty.netty-transport-native-epoll.scope}</scope>
</dependency>
</dependencies>
</profile>

</profiles>
</project>

0 comments on commit 7cce795

Please sign in to comment.