Files
maven-mvnd/client/pom.xml
Tamas Cservenak c8ca1c0b75 Drop buildnumber plugin, Nisse is in place (#1319)
Just use Nisse, as it is already in place, plus it does not require git checkout either.

Fixes #1306 

Nota bene: this does not solve "rebuilding from tarball", as output will still not contain revision (will be empty). Just like Maven, MavenDaemon also relies on git to provide SCM hash shown in version.

But the build will not fail at least, and Maarten will be able to rebuild from tarball, but the build output will be different from that built from git checkout.
2025-05-10 14:54:42 +02:00

256 lines
8.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2019 the original author or authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>2.0.0-rc-4-SNAPSHOT</version>
</parent>
<artifactId>mvnd-client</artifactId>
<packaging>jar</packaging>
<name>Maven Daemon - Client</name>
<properties>
<patchelf.skip>true</patchelf.skip>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-common</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-logging</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>fallback-main</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>${maven-dist.required.jdk}</release>
<compileSourceRoots>
<root>${project.basedir}/src/main/java-fallback</root>
</compileSourceRoots>
</configuration>
</execution>
<execution>
<id>mvnd-main</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<multiReleaseOutput>true</multiReleaseOutput>
<compileSourceRoots>
<root>${project.basedir}/src/main/java-mvnd</root>
</compileSourceRoots>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<project.basedir>${project.basedir}</project.basedir>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>enable-partial-static-native</id>
<activation>
<os>
<family>!mac</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<buildArgs combine.children="append">
<buildArg>-H:+StaticExecutableWithDynamicLibC</buildArg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>linux-image-only-require-glibc-2.12</id>
<activation>
<os>
<family>linux</family>
</os>
<file>
<exists>target/graalvm-libs-for-glibc-2.12</exists>
</file>
</activation>
<properties>
<patchelf.skip>false</patchelf.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<buildArgs combine.children="append">
<buildArg>-H:CCompilerPath=${basedir}/src/main/resources/glibc/gcc</buildArg>
<buildArg>-H:CCompilerOption=-B${project.build.directory}/graalvm-libs-for-glibc-2.12</buildArg>
<buildArg>-H:CLibraryPath=${project.build.directory}/graalvm-libs-for-glibc-2.12</buildArg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>native</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<skip>false</skip>
<mainClass>org.mvndaemon.mvnd.client.DefaultClient</mainClass>
<imageName>mvnd</imageName>
<buildArgs combine.children="append">
<buildArg>--no-fallback</buildArg>
<buildArg>-march=compatibility</buildArg>
<buildArg>-H:+UnlockExperimentalVMOptions</buildArg>
<buildArg>-H:IncludeResources=org/mvndaemon/mvnd/.*</buildArg>
<buildArg>-H:IncludeResources=mvnd-bash-completion.bash</buildArg>
<buildArg>-H:-ParseRuntimeOptions</buildArg>
<buildArg>-H:+AddAllCharsets</buildArg>
<buildArg>-H:+ReportExceptionStackTraces</buildArg>
<buildArg>-ea</buildArg>
</buildArgs>
</configuration>
<executions>
<execution>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<skip>${patchelf.skip}</skip>
<executable>patchelf</executable>
<arguments>
<argument>--add-needed</argument>
<argument>libpthread.so.0</argument>
<argument>--add-needed</argument>
<argument>librt.so.1</argument>
<argument>--add-needed</argument>
<argument>libdl.so.2</argument>
<argument>${project.build.directory}/mvnd</argument>
</arguments>
</configuration>
<executions>
<execution>
<id>add-needed-glibc-so</id>
<goals>
<goal>exec</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>