Skip to content

Commit

Permalink
fix: Get the PLC4C build working on linux aarch64 (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdutz committed May 5, 2024
1 parent 0c4b6b9 commit 0e1c8c5
Showing 1 changed file with 78 additions and 1 deletion.
79 changes: 78 additions & 1 deletion plc4c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,83 @@
</dependencies>
</profile>

<!--
In order to build on linux with aarch64 systems, we need to download and deploy
an artifact as the linux aarch64 version seems to be missing.
-->
<profile>
<id>.os-linux-aarch64</id>
<activation>
<os>
<family>linux</family>
<arch>aarch64</arch>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<execution>
<id>download-aarch64-linux-binaries</id>
<phase>validate</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://cmake.org/files/v3.27/cmake-3.27.7-linux-aarch64.tar.gz</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}/redeploy</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>package-aarch64-linux-binaries</id>
<phase>validate</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classesDirectory>${project.build.directory}/redeploy/cmake-3.27.7-linux-aarch64</classesDirectory>
<includes>
<include>**</include>
</includes>
<finalName>cmake-binaries-${cmake.version}-linux-arm_64</finalName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-aarch64-linux-binaries</id>
<phase>validate</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${project.build.directory}/cmake-binaries-${cmake.version}-linux-arm_64.jar</file>
<groupId>com.googlecode.cmake-maven-project</groupId>
<artifactId>cmake-binaries</artifactId>
<version>${cmake.version}</version>
<classifier>linux-arm_64</classifier>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!--
In order to build on windows with aarch64 systems, we need to re-deploy an
artifact which was unfortunately deployed with the wrong classifier.
Expand All @@ -393,7 +470,7 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>get-aarch64-windows-binaries</id>
<id>download-aarch64-windows-binaries</id>
<phase>validate</phase>
<goals>
<goal>copy</goal>
Expand Down

0 comments on commit 0e1c8c5

Please sign in to comment.