llama
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>net.ladenthin</groupId>
<artifactId>llama</artifactId>
<version>5.0.2</version>
</dependency><!--
SPDX-FileCopyrightText: 2026 Bernard Ladenthin <bernard.ladenthin@gmail.com>
SPDX-FileCopyrightText: 2023-2025 Konstantin Herud
SPDX-License-Identifier: MIT
-->
<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>net.ladenthin</groupId>
<artifactId>llama</artifactId>
<version>5.0.2</version>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>Java Bindings for llama.cpp - A Port of Facebook's LLaMA model
in C/C++.</description>
<url>https://github.com/bernardladenthin/java-llama.cpp</url>
<licenses>
<license>
<name>MIT License</name>
<url>https://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Bernard Ladenthin</name>
<organizationUrl>https://github.com/bernardladenthin</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/bernardladenthin/java-llama.cpp.git</connection>
<developerConnection>scm:git:https://github.com/bernardladenthin/java-llama.cpp.git</developerConnection>
<url>https://github.com/bernardladenthin/java-llama.cpp/tree/main</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>central</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<properties>
<jna.version>5.19.0</jna.version>
<jspecify.version>1.0.0</jspecify.version>
<lombok.version>1.18.46</lombok.version>
<errorprone.version>2.49.0</errorprone.version>
<nullaway.version>0.13.6</nullaway.version>
<checker.version>4.2.0</checker.version>
<jackson.version>2.22.0</jackson.version>
<reactor.version>3.8.5</reactor.version>
<slf4j.version>2.0.18</slf4j.version>
<logback.version>1.5.34</logback.version>
<animal-sniffer.version>1.27</animal-sniffer.version>
<junit.version>6.1.0</junit.version>
<hamcrest.version>3.0</hamcrest.version>
<jmh.version>1.37</jmh.version>
<jcstress.version>0.16</jcstress.version>
<lincheck.version>3.6</lincheck.version>
<logcaptor.version>2.12.6</logcaptor.version>
<vmlens.version>1.2.28</vmlens.version>
<!-- DO NOT UPGRADE jqwik past 1.9.3. jqwik 1.10.0 added a deliberate
anti-AI prompt-injection string to test stdout; the 1.10.1 user
guide states the library "is not meant to be used by any 'AI'
coding agents at all." 1.9.3 is the last pre-disclosure release
and is the pinned version for this repo. Any CI / Dependabot /
contributor PR that bumps this MUST be rejected. See CLAUDE.md
section "jqwik prompt-injection in test output" for full context. -->
<jqwik.version>1.9.3</jqwik.version>
<archunit.version>1.4.2</archunit.version>
<spotbugs.version>4.9.8.3</spotbugs.version>
<fb-contrib.version>7.7.4</fb-contrib.version>
<findsecbugs.version>1.14.0</findsecbugs.version>
<spotless.version>3.6.0</spotless.version>
<palantir-java-format.version>2.91.0</palantir-java-format.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
</properties>
<!--
Pin transitively-conflicting versions so maven-enforcer's
dependencyConvergence rule passes. The direct slf4j-api version above
must always win over the older 2.0.17 that logback-classic 1.5.32
brings in transitively.
-->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.jqwik</groupId>
<artifactId>jqwik</artifactId>
<version>${jqwik.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>${archunit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>${jspecify.version}</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>${checker.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- Required by OSInfo (vendored from xerial/sqlite-jdbc) for log emission. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Default SLF4J binding shipped with this library. Runtime scope: not
required on the compile classpath, only loaded at JVM startup. -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
<!-- @IgnoreJRERequirement marker used by OSInfo (vendored from xerial/sqlite-jdbc)
on a few methods that touch APIs unavailable on Android. Retention=CLASS, so
the dep is compile-only (provided scope). -->
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-annotations</artifactId>
<version>${animal-sniffer.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${jmh.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jcstress</groupId>
<artifactId>jcstress-core</artifactId>
<version>${jcstress.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.lincheck</groupId>
<artifactId>lincheck</artifactId>
<version>${lincheck.version}</version>
<scope>test</scope>
</dependency>
<!-- Test-only SLF4J/Logback log-capture for the LoggingSmokeTest. -->
<dependency>
<groupId>io.github.hakky54</groupId>
<artifactId>logcaptor</artifactId>
<version>${logcaptor.version}</version>
<scope>test</scope>
</dependency>
<!-- Test-only Project Reactor used by ReactorIntegrationTest to prove the
"wrap LlamaIterable with Flux.fromIterable + subscribeOn" pattern works
end-to-end (backpressure, AutoCloseable cancel propagation). NOT a runtime
dependency — consumers bring whichever reactive lib they already use
(Reactor / RxJava / Kotlin Flow / Akka — see README "Reactive integration"). -->
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>${reactor.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>${reactor.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.version}</version>
</plugin>
<plugin>
<groupId>com.vmlens</groupId>
<artifactId>vmlens-maven-plugin</artifactId>
<version>${vmlens.version}</version>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>10.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.8</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.6.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.15</version>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.25.3</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.6.3,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[1.8,)</version>
</requireJavaVersion>
<dependencyConvergence/>
<bannedDependencies>
<excludes>
<!-- Use SLF4J directly; never commons-logging. -->
<exclude>commons-logging:commons-logging</exclude>
<!-- Legacy / EoL logging frameworks. -->
<exclude>log4j:log4j</exclude>
<!-- Old hamcrest split artifacts; use hamcrest:hamcrest 2.x+. -->
<exclude>org.hamcrest:hamcrest-core</exclude>
<exclude>org.hamcrest:hamcrest-library</exclude>
<exclude>org.hamcrest:hamcrest-all</exclude>
<!-- Legacy JUnit 3 / 4; we use Jupiter (junit:junit-jupiter). -->
<exclude>junit:junit</exclude>
<exclude>junit:junit-dep</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<executions>
<execution>
<id>get-git-properties</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
<configuration>
<dateFormat>yyyy-MM-dd'T'HH:mm:ss'Z'</dateFormat>
<dateFormatTimeZone>UTC</dateFormatTimeZone>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
<testRelease>21</testRelease>
<showWarnings>true</showWarnings>
<parameters>true</parameters>
<compilerArgs>
<!--
-Xlint:all surfaces every category of javac warning. Excluded:
-serial : serialVersionUID warnings on non-Serializable classes
-options : bootclasspath / target-mismatch chatter under release=8
-classfile : noise when javac reads our own .class output mid-build
-processing: "No processor claimed any of these annotations" — the
animal-sniffer @IgnoreJRERequirement is consumed by the
maven-plugin (not a JSR-269 processor), so javac flags
it every build
-Werror is on: the ElementType.MODULE blocker is gone now that
@NullMarked lives only in module-info.java (compiled at release 9 in
a separate execution); see module-info.java's javadoc.
-->
<arg>-Xlint:all,-serial,-options,-classfile,-processing</arg>
<arg>-Werror</arg>
<!--
Checker Framework Nullness Checker runs as a second nullness pass
alongside NullAway. CF is generics-aware and stricter than NullAway,
so it acts as a second-opinion verifier on the same JSpecify
annotations.
-->
<!-- Explicit processor list: Lombok (two SPI classes) + Checker Framework's
Nullness Checker as a 2nd nullness pass alongside NullAway. The explicit
-processor argument overrides SPI discovery, so every processor we want
to run must be listed here. -->
<arg>-processor</arg>
<arg>lombok.launch.AnnotationProcessorHider$AnnotationProcessor,lombok.launch.AnnotationProcessorHider$ClaimingProcessor,org.checkerframework.checker.nullness.NullnessChecker</arg>
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>
<arg>-Xplugin:ErrorProne -Xep:NullAway:ERROR -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:JSpecifyMode=true -XepOpt:NullAway:CheckOptionalEmptiness=true -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -XepOpt:NullAway:AcknowledgeAndroidRecent=true -XepOpt:NullAway:AssertsEnabled=true -Xep:BoxedPrimitiveEquality:ERROR -Xep:EqualsHashCode:ERROR -Xep:EqualsIncompatibleType:ERROR -Xep:IdentityBinaryExpression:ERROR -Xep:SelfAssignment:ERROR -Xep:SelfComparison:ERROR -Xep:SelfEquals:ERROR -Xep:DeadException:ERROR -Xep:FormatString:ERROR -Xep:InvalidPatternSyntax:ERROR -Xep:OptionalEquality:ERROR -Xep:ImpossibleNullComparison:ERROR</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${errorprone.version}</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway.version}</version>
</path>
<path>
<groupId>org.checkerframework</groupId>
<artifactId>checker</artifactId>
<version>${checker.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<!-- The default compile pass targets Java 8 bytecode for the library
sources. module-info.java cannot be compiled at release 8 (it is a
Java 9+ construct) and is handled by the separate execution below. -->
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>module-info-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<!-- module-info.java is the only Java 9+ source in this project; compile
it at release 9 (the minimum version that understands modules) without
the Error Prone / NullAway / Checker Framework processors that target
ordinary source files only. Java 8 runtimes silently ignore the
resulting module-info.class at the JAR root, so existing classpath
consumers continue to work unchanged. LlamaLoader loads native libs
via Class.getResourceAsStream on its own class object, which resolves
to this module and therefore does not require any opens directives. -->
<release>9</release>
<includes>
<include>module-info.java</include>
</includes>
<compilerArgs combine.self="override"/>
<annotationProcessorPaths combine.self="override"/>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<configuration>
<!-- Drop -parameters for test compile so jcstress reflection doesn't
pick up parameter names from MethodParameters. -->
<parameters>false</parameters>
<compilerArgs combine.self="override">
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>
<arg>-Xplugin:ErrorProne -Xep:NullAway:OFF -Xep:GuardedBy:OFF</arg>
</compilerArgs>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>org.openjdk.jcstress</groupId>
<artifactId>jcstress-core</artifactId>
<version>${jcstress.version}</version>
</path>
<path>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>1.8</source>
<failOnError>true</failOnError>
<failOnWarnings>true</failOnWarnings>
<doclint>all</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!--
Surefire is configured here only to control native-crash diagnostics:
- argLine inherits jacoco's @{argLine} (so the jacoco runtime agent stays
attached) and appends -XX:ErrorFile so the JVM crash log (hs_err_pid<pid>.log)
always lands in the project basedir, which is the same directory the CI
upload-artifact globs (${{ github.workspace }}/hs_err_pid*.log).
- HeapDumpOnOutOfMemoryError + HeapDumpPath catch OOMs that would otherwise
just print a stack and exit.
- The version is pinned to the same release Maven would otherwise auto-select
(visible in CI error logs as 3.5.4), so we don't drift independently of
Maven's plugin-defaults bump.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} -XX:ErrorFile=hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=.</argLine>
<!--
Capture each test class's stdout/stderr into
target/surefire-reports/<class>-output.txt. When a native crash
takes down the forked JVM, this file is the ONLY record of
which @Test method was last running (without it the surefire
*.txt summary just says "VM terminated", which we already saw
in CI without telling us which test was on fire).
-->
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<palantirJavaFormat>
<version>${palantir-java-format.version}</version>
</palantirJavaFormat>
<removeUnusedImports/>
<trimTrailingWhitespace/>
<endWithNewline/>
</java>
</configuration>
<executions>
<execution>
<id>spotless-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<failOnError>true</failOnError>
<includeTests>false</includeTests>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
<plugins>
<plugin>
<groupId>com.mebigfatguy.fb-contrib</groupId>
<artifactId>fb-contrib</artifactId>
<version>${fb-contrib.version}</version>
</plugin>
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
<artifactId>findsecbugs-plugin</artifactId>
<version>${findsecbugs.version}</version>
</plugin>
</plugins>
</configuration>
<executions>
<execution>
<id>spotbugs-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>org.openjdk.jmh.Main</mainClass>
<classpathScope>test</classpathScope>
</configuration>
</plugin>
<plugin>
<!--
PIT mutation testing is scoped to packages that have reached 100%
mutation parity, gated at a 100% threshold on every CI build. Expand
the targetClasses globs as further packages reach parity (see README
TODO). The value/ and exception/ trees are at 100% (verified with
pitest-maven 1.25.3); their unit tests are pure-Java (no native
libjllama / model file needed).
-->
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
<configuration>
<targetClasses>
<param>net.ladenthin.llama.value.*</param>
<param>net.ladenthin.llama.exception.*</param>
<param>net.ladenthin.llama.args.*</param>
<param>net.ladenthin.llama.json.TimingsLogger</param>
<param>net.ladenthin.llama.json.RerankResponseParser</param>
<param>net.ladenthin.llama.json.ChatResponseParser</param>
<param>net.ladenthin.llama.json.CompletionResponseParser</param>
</targetClasses>
<targetTests>
<param>net.ladenthin.llama.value.*</param>
<param>net.ladenthin.llama.exception.*</param>
<param>net.ladenthin.llama.args.*</param>
<param>net.ladenthin.llama.json.*</param>
</targetTests>
<mutationThreshold>100</mutationThreshold>
<timeoutConstant>30000</timeoutConstant>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals><goal>sign</goal></goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>cuda</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<!-- We have to perform a separate build pass for cuda
classifier -->
<execution>
<id>gpu</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<!-- Same rationale as default-compile: this pass targets release 8;
module-info.java is Java 9+ and is handled by module-info-compile. -->
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_cuda</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Copy custom cuda libs to the output directory -->
<execution>
<id>copy-resources</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_cuda</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_linux_cuda/</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<!-- Pick class files AND libs from custom output
directory -->
<execution>
<id>cuda</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>cuda13-linux-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_cuda</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>opencl-android</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<!-- Separate build pass for opencl-android classifier -->
<execution>
<id>opencl-android</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<!-- Same rationale as default-compile: this pass targets release 8;
module-info.java is Java 9+ and is handled by module-info-compile. -->
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_opencl_android</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Copy custom opencl-android libs to the output directory -->
<execution>
<id>copy-resources-opencl-android</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_opencl_android</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_android_opencl/</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<!-- Pick class files AND libs from custom output
directory -->
<execution>
<id>opencl-android</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>opencl-android-aarch64</classifier>
<classesDirectory>
${project.build.outputDirectory}_opencl_android</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>vmlens</id>
<dependencies>
<dependency>
<groupId>com.vmlens</groupId>
<artifactId>api</artifactId>
<version>${vmlens.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.vmlens</groupId>
<artifactId>vmlens-maven-plugin</artifactId>
<configuration>
<!--
Lincheck generates its own TestThreadExecution class on the fly.
That bytecode clashes with vmlens's load-time instrumentation
(java.lang.VerifyError). Skip the Lincheck test under vmlens;
the default test job still runs it.
**/*$* is the plugin default - kept to preserve inner-class skip.
-->
<excludes>
<exclude>**/*$*</exclude>
<exclude>**/CancellationTokenLincheckTest.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>vmlens-test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jcstress</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>jcstress</id>
<phase>test</phase>
<goals><goal>exec</goal></goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<classpathScope>test</classpathScope>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.openjdk.jcstress.Main</argument>
<argument>-v</argument>
<argument>-m</argument>
<argument>default</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>