llama
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>net.ladenthin</groupId>
<artifactId>llama</artifactId>
<version>5.0.6</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>
<parent>
<groupId>net.ladenthin</groupId>
<artifactId>llama-parent</artifactId>
<version>5.0.6</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>llama</artifactId>
<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>
<sonar.organization>bernardladenthin</sonar.organization>
<jna.version>5.19.0</jna.version>
<jspecify.version>1.0.0</jspecify.version>
<lombok.version>1.18.46</lombok.version>
<errorprone.version>2.50.0</errorprone.version>
<nullaway.version>0.13.7</nullaway.version>
<checker.version>4.2.1</checker.version>
<jackson.version>2.22.0</jackson.version>
<reactor.version>3.8.6</reactor.version>
<slf4j.version>2.0.18</slf4j.version>
<logback.version>1.5.37</logback.version>
<animal-sniffer.version>1.27</animal-sniffer.version>
<junit.version>6.1.1</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.10.2.0</spotbugs.version>
<fb-contrib.version>7.7.4</fb-contrib.version>
<findsecbugs.version>1.14.0</findsecbugs.version>
<spotless.version>3.8.0</spotless.version>
<palantir-java-format.version>2.94.0</palantir-java-format.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputTimestamp>2026-07-07T07:24:29Z</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>
<!--
vmlens interleaving-analysis API. Test-scoped and transitive-dependency-free
(its own deps are all test-scope, hence not propagated), so it is safe on the
default test classpath under dependencyConvergence. Needed so the
VmlensInterleavingSmoke* test compiles in every build; it is only *executed*
under the `vmlens` profile (see that profile + the vmlens CI job). The default
surefire run excludes it (managed surefire <excludes> below) so the vmlens
agent's JDK 9 API class is never loaded outside the agent-driven run.
-->
<dependency>
<groupId>com.vmlens</groupId>
<artifactId>api</artifactId>
<version>${vmlens.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-assembly-plugin</artifactId>
<version>3.8.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>
<configuration>
<!--
Tests in the `vmlens` package are meaningful only when run
under the vmlens agent (the `vmlens` profile / CI job). Without the
agent its AllInterleavings loop body never executes (a vacuous pass
that also prints an "agent not configured" warning), so exclude it
from the ordinary surefire run. The vmlens job re-includes them with
`-Dtest=...`, which overrides this exclude.
-->
<excludes>
<exclude>**/vmlens/*.java</exclude>
</excludes>
</configuration>
</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.5</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.11.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 is "all,-missing" (not plain "all") because Javadoc runs on the RAW
source, before Lombok's annotation processor runs, so it cannot see the
constructor Lombok's class-level @Builder generates. For a Lombok value class
like TrainingParameters it therefore reports a spurious "use of default
constructor, which does not provide a comment" (the `missing` group) even
though no public default constructor exists at compile time. Dropping only the
`missing` group avoids hand-writing the redundant all-args constructor that
@Builder already generates, while keeping the reference / html / syntax /
accessibility checks fatal (a broken {@link} or malformed HTML still fails the
build). failOnWarnings stays true so those categories remain enforced.
-->
<doclint>all,-missing</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} -Xmx2g -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>
<!--
Generic PIT policy (version, 100% gate, invocation, expansion rule):
see ../workspace/policies/pit-mutation-testing.md.
Repo-specific: the gated value/exception/args/json classes are pure-Java
(no native libjllama or model file needed); targetClasses/targetTests are
kept in lock-step. The gate is hermetic: ContentPartTest's @TempDir tests
cover value.ContentPart.audioFile(Path), so no fixture is required.
-->
<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>
<!--
The `release` profile (GPG signing + Central Publishing) now lives in the parent
pom (../pom.xml) and is inherited, so a single reactor `mvn -P release deploy`
signs and publishes every module. The per-classifier native profiles below stay
here — they are core-specific.
-->
<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>
<!-- MSVC (Visual Studio generator) Windows CPU natives, shipped as the
`msvc-windows` classifier JAR. After the default flip the DEFAULT JAR
ships the Ninja Multi-Config natives (sccache-cached, merged into
src/main/resources/ by CI); this profile packages the alternative
MSVC-generator build for anyone who wants it. Both use the same MSVC
toolchain (static /MT CRT) so they are functionally equivalent. Mirrors
the cuda / opencl-android classifier pattern: a separate compile pass +
resource copy + classified jar. The MSVC DLLs are staged into
src/main/resources_windows_msvc/ by CI before this profile runs. -->
<id>windows-msvc</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<!-- Separate build pass for the windows-msvc classifier -->
<execution>
<id>windows-msvc</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}_windows_msvc</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- Copy the Ninja-built Windows libs to the output directory -->
<execution>
<id>copy-resources-windows-msvc</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_msvc</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_msvc/</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>windows-msvc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>msvc-windows</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_msvc</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Windows CUDA GPU natives (x86_64 only), shipped as the
`cuda13-windows-x86-64` classifier JAR. Built with -DGGML_CUDA=ON and
routed by CMakeLists.txt to src/main/resources_windows_cuda/. The CUDA
runtime libs (cudart64_13 / cublas64_13 / cublasLt64_13) are NOT bundled
— the consumer's installed CUDA Toolkit provides them. Mirrors the
cuda (Linux) classifier pattern. Staged by CI before this profile runs. -->
<id>cuda-windows</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>cuda-windows</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_windows_cuda</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-cuda-windows</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_cuda</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_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>
<execution>
<id>cuda-windows</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>cuda13-windows-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_cuda</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Windows Vulkan GPU natives (x86_64 only), shipped as the
`vulkan-windows-x86-64` classifier JAR. Built with -DGGML_VULKAN=ON and
routed by CMakeLists.txt to src/main/resources_windows_vulkan/. The Vulkan
runtime (vulkan-1.dll) ships with the GPU driver — nothing is bundled.
Vulkan is the most portable Windows GPU backend (NVIDIA/AMD/Intel).
Staged by CI before this profile runs. -->
<id>vulkan-windows</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>vulkan-windows</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_windows_vulkan</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-vulkan-windows</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_vulkan</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_vulkan/</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>vulkan-windows</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>vulkan-windows-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_vulkan</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Linux x86_64 Vulkan GPU natives, shipped as the `vulkan-linux-x86-64`
classifier JAR. Built with -DGGML_VULKAN=ON and routed by CMakeLists.txt to
src/main/resources_linux_vulkan/.../Linux/x86_64/. The Vulkan runtime
(libvulkan.so.1) ships with the consumer's GPU driver - nothing is bundled. The
resource copy includes ONLY the Linux/x86_64 subtree so the other arch's natives
(staged into the same tree by the sibling job) do not leak into this JAR. Staged by
CI before this profile runs. -->
<id>vulkan-linux</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>vulkan-linux</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_linux_vulkan</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-vulkan-linux</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_linux_vulkan</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_linux_vulkan/</directory>
<includes>
<include>net/ladenthin/llama/Linux/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>vulkan-linux</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>vulkan-linux-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_linux_vulkan</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Linux aarch64 Vulkan GPU natives, shipped as the `vulkan-linux-aarch64`
classifier JAR. Built with -DGGML_VULKAN=ON and routed by CMakeLists.txt to
src/main/resources_linux_vulkan/.../Linux/aarch64/. The Vulkan runtime
(libvulkan.so.1) ships with the consumer's GPU driver - nothing is bundled. The
resource copy includes ONLY the Linux/aarch64 subtree so the other arch's natives
(staged into the same tree by the sibling job) do not leak into this JAR. Staged by
CI before this profile runs. -->
<id>vulkan-linux-aarch64</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>vulkan-linux-aarch64</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_linux_vulkan_aarch64</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-vulkan-linux-aarch64</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_linux_vulkan_aarch64</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_linux_vulkan/</directory>
<includes>
<include>net/ladenthin/llama/Linux/aarch64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>vulkan-linux-aarch64</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>vulkan-linux-aarch64</classifier>
<classesDirectory>
${project.build.outputDirectory}_linux_vulkan_aarch64</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Windows OpenCL GPU natives (x86_64), shipped as the
`opencl-windows-x86-64` classifier JAR. Built with -DGGML_OPENCL=ON and
routed by CMakeLists.txt to src/main/resources_windows_opencl/. The OpenCL
ICD (System32\OpenCL.dll) ships with the GPU driver — nothing is bundled.
NOTE: the GGML OpenCL backend is Adreno-tuned; on desktop GPUs CUDA/Vulkan
are better supported. The resource copy includes ONLY the Windows/x86_64
subtree so the aarch64 natives (opencl-windows-aarch64, staged into the same
tree by the sibling job) do not leak into this JAR. Staged by CI before this
profile runs. -->
<id>opencl-windows</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>opencl-windows</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_windows_opencl</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-opencl-windows</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_opencl</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_opencl/</directory>
<includes>
<include>net/ladenthin/llama/Windows/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>opencl-windows</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>opencl-windows-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_opencl</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Linux x86_64 AMD ROCm/HIP GPU natives, shipped as the `rocm-linux-x86-64` classifier JAR.
Built with -DGGML_HIP=ON and routed by CMakeLists.txt to src/main/resources_linux_rocm/.
The ROCm/HIP runtime ships with the consumer's ROCm install - nothing is bundled. Staged by
CI before this profile runs. -->
<id>rocm-linux</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>rocm-linux</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_linux_rocm</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-rocm-linux</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_linux_rocm</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_linux_rocm/</directory>
<includes>
<include>net/ladenthin/llama/Linux/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>rocm-linux</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>rocm-linux-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_linux_rocm</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Windows x86_64 AMD ROCm/HIP GPU natives, shipped as the `rocm-windows-x86-64` classifier JAR.
Built with -DGGML_HIP=ON and routed by CMakeLists.txt to src/main/resources_windows_rocm/.
The HIP SDK runtime DLLs ship with the consumer's AMD HIP SDK - nothing is bundled. Staged by
CI before this profile runs. -->
<id>rocm-windows</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>rocm-windows</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_windows_rocm</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-rocm-windows</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_rocm</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_rocm/</directory>
<includes>
<include>net/ladenthin/llama/Windows/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>rocm-windows</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>rocm-windows-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_rocm</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Linux x86_64 Intel SYCL (oneAPI, fp16) GPU natives, shipped as the `sycl-fp16-linux-x86-64`
classifier JAR. Built with -DGGML_SYCL=ON -DGGML_SYCL_F16=ON and routed by CMakeLists.txt to
src/main/resources_linux_sycl_fp16/. The oneAPI runtime ships with the consumer's oneAPI
install - nothing is bundled. Staged by CI before this profile runs. -->
<id>sycl-fp16-linux</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>sycl-fp16-linux</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_linux_sycl_fp16</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-sycl-fp16-linux</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_linux_sycl_fp16</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_linux_sycl_fp16/</directory>
<includes>
<include>net/ladenthin/llama/Linux/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>sycl-fp16-linux</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>sycl-fp16-linux-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_linux_sycl_fp16</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Linux x86_64 Intel SYCL (oneAPI, fp32) GPU natives, shipped as the `sycl-fp32-linux-x86-64`
classifier JAR. Built with -DGGML_SYCL=ON (F16 off) and routed by CMakeLists.txt to
src/main/resources_linux_sycl_fp32/. The oneAPI runtime ships with the consumer's oneAPI
install - nothing is bundled. Staged by CI before this profile runs. -->
<id>sycl-fp32-linux</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>sycl-fp32-linux</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_linux_sycl_fp32</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-sycl-fp32-linux</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_linux_sycl_fp32</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_linux_sycl_fp32/</directory>
<includes>
<include>net/ladenthin/llama/Linux/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>sycl-fp32-linux</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>sycl-fp32-linux-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_linux_sycl_fp32</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Windows x86_64 Intel SYCL (oneAPI) GPU natives, shipped as the `sycl-windows-x86-64` classifier
JAR. Built with -DGGML_SYCL=ON and routed by CMakeLists.txt to src/main/resources_windows_sycl/.
The oneAPI runtime ships with the consumer's oneAPI install - nothing is bundled. Staged by CI
before this profile runs. -->
<id>sycl-windows</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>sycl-windows</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_windows_sycl</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-sycl-windows</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_sycl</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_sycl/</directory>
<includes>
<include>net/ladenthin/llama/Windows/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>sycl-windows</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>sycl-windows-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_sycl</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Windows aarch64 OpenCL (Adreno/Snapdragon) GPU natives, shipped as the `opencl-windows-aarch64`
classifier JAR. Built with -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON and routed by
CMakeLists.txt to src/main/resources_windows_opencl/.../Windows/aarch64/ (same tree as the x86_64
OpenCL build). The OpenCL ICD (System32\OpenCL.dll) ships with the Adreno driver - nothing is
bundled. The resource copy includes ONLY the Windows/aarch64 subtree so the x86_64 natives do not
leak into this JAR. Staged by CI before this profile runs. -->
<id>opencl-windows-aarch64</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>opencl-windows-aarch64</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_windows_opencl_aarch64</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-opencl-windows-aarch64</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_opencl_aarch64</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_opencl/</directory>
<includes>
<include>net/ladenthin/llama/Windows/aarch64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>opencl-windows-aarch64</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>opencl-windows-aarch64</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_opencl_aarch64</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Linux x86_64 Intel OpenVINO GPU/NPU natives, shipped as the `openvino-linux-x86-64` classifier
JAR. Built with -DGGML_OPENVINO=ON and routed by CMakeLists.txt to
src/main/resources_linux_openvino/. The OpenVINO runtime ships with the consumer's OpenVINO
install - nothing is bundled. Staged by CI before this profile runs. -->
<id>openvino-linux</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>openvino-linux</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_linux_openvino</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-openvino-linux</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_linux_openvino</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_linux_openvino/</directory>
<includes>
<include>net/ladenthin/llama/Linux/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>openvino-linux</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>openvino-linux-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_linux_openvino</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Windows x86_64 Intel OpenVINO GPU/NPU natives, shipped as the `openvino-windows-x86-64`
classifier JAR. Built with -DGGML_OPENVINO=ON and routed by CMakeLists.txt to
src/main/resources_windows_openvino/. The OpenVINO runtime ships with the consumer's OpenVINO
install - nothing is bundled. Staged by CI before this profile runs. -->
<id>openvino-windows</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>openvino-windows</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
<compilerArgs>
<arg>-h</arg>
<arg>src/main/cpp</arg>
</compilerArgs>
<outputDirectory>
${project.build.outputDirectory}_windows_openvino</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources-openvino-windows</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.outputDirectory}_windows_openvino</outputDirectory>
<resources>
<resource>
<directory>
${basedir}/src/main/resources_windows_openvino/</directory>
<includes>
<include>net/ladenthin/llama/Windows/x86_64/**</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>openvino-windows</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>openvino-windows-x86-64</classifier>
<classesDirectory>
${project.build.outputDirectory}_windows_openvino</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>vmlens</id>
<build>
<plugins>
<plugin>
<groupId>com.vmlens</groupId>
<artifactId>vmlens-maven-plugin</artifactId>
<configuration>
<!--
Run vmlens interleaving analysis over the whole `vmlens` test
package (smoke test + SessionStateInterleavingTest). The `com.vmlens:api`
test dependency lives in the main <dependencies> block.
Expand <includes> as more concurrency tests are added (the
streambuffer repo runs vmlens over its whole suite).
-->
<includes>
<include>**/vmlens/*.java</include>
</includes>
</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>
<profile>
<!--
Builds the fat jar-with-dependencies uber JAR: the library classes, the
default-platform native libs from src/main/resources, and all runtime Java
dependencies in one drop-on-classpath JAR, with ServerLauncher as the fat-jar
Main-Class (set below), which dispatches on an `jllama-openai-compat` selector flag: with it, runs
OpenAiCompatServer (Java OpenAI API); without it, the default NativeServer (native
server, embedded WebUI, all flags forwarded). Both mains stay runnable by class name via `java -cp <jar> …`. Off by
default; the CI `package` job activates it so the uber JAR rides along in the
`llama-jars` upload-artifact bundle. Documented in CLAUDE.md "Build Commands"
as `mvn -P assembly package`.
-->
<id>assembly</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>net.ladenthin.llama.server.ServerLauncher</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>build-fat-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>