srcmorph-maven-plugin
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>net.ladenthin</groupId>
<artifactId>srcmorph-maven-plugin</artifactId>
<version>1.4.0</version>
</dependency><!-- SPDX-FileCopyrightText: 2026 Bernard Ladenthin <[email protected]> SPDX-License-Identifier: Apache-2.0 --> <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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.ladenthin</groupId> <artifactId>srcmorph-parent</artifactId> <version>1.4.0</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>srcmorph-maven-plugin</artifactId> <packaging>maven-plugin</packaging> <name>srcmorph-maven-plugin</name> <description>Free Maven plugin for hierarchical AI-readable indexing and summarization of source code projects using llama.cpp-compatible local models. Formerly published as net.ladenthin:llamacpp-ai-index-maven-plugin (see the relocation stub of that name).</description> <!-- Declared explicitly rather than inherited. The parent sets child.project.url.inherit.append.path="false" on its own url element. That flag demonstrably works for scm (the effective POM shows the un-appended connection) but is silently dropped for the project URL by Maven 3.9.11: the inherited value still came out as https://github.com/bernardladenthin/srcmorph/srcmorph-maven-plugin, which does not exist. A published POM pointing at a nonexistent URL is the whole defect, so the real value is declared here, where it is verifiable in the effective POM. --> <url>https://github.com/bernardladenthin/srcmorph</url> <properties> <sonar.organization>bernardladenthin</sonar.organization> <maven.compiler.release>8</maven.compiler.release> <maven.compiler.testRelease>21</maven.compiler.testRelease> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.plugin.tools.version>3.16.0</maven.plugin.tools.version> <maven.version>3.10.0</maven.version> <!-- net.ladenthin:llama is now a dependency of the srcmorph core module (only the provider package touches it); this module no longer declares it directly. The gpu-cuda / gpu-vulkan profiles that add a GPU natives jar live on srcmorph/pom.xml, since the natives are resolved at srcmorph's own build. --> <!-- ==================================================================================== `ai.*` properties (ai.model / ai.gpuLayers / ai.mainGpu / ai.devices / ai.modelDir / ai.profileDir / ai.index.output.directory) are THIS repo's own Maven BUILD properties for the self-test profile, NOT plugin @Parameters. srcmorph-selftest.yaml names them as ${ai.*}, which the plugin fills from the Maven properties, so each is overridable per run with -Dai.<name>=<value>. Downstream consumers of the PUBLISHED plugin do NOT inherit these; their own configuration file sets the same knobs (gpuLayers, mainGpu, devices, aiDefinitionKey) and may use ${...} for their own properties. The published mojo parameters are the separate `srcmorph.*` set (see AbstractAiIndexMojo). Do NOT "fix" the docs' `-Dai.*` examples to `srcmorph.*`: the two namespaces are intentionally different. ==================================================================================== --> <!-- Default AI model definition (key) used by the gpt-oss profile's generate/aggregate executions. gpt-oss-20B-mxfp4 is the native MXFP4 format: same ~12 GB size and decode speed as the Q4/Q5/Q8 variants (the MoE experts are MXFP4 regardless), but no double-quantization of the experts -> best quality. Override with -Dai.model=<another key of the aiDefinitions>. --> <ai.model>gpt-oss-20B-mxfp4</ai.model> <!-- GPU layer offload for the gpt-oss presets (the gpu-layers / n_gpu_layers flag). -1 (default) = do NOT pin a count, so llama.cpp AUTO-FITS as many layers as fit the card's free VRAM. This is the robust "runs on any card" setting: it never over-commits (no OOM on a 6 GB card) and uses more layers on a bigger card. A CPU build stays on CPU. Pin a count only to force a specific partial split (e.g. -Dai.gpuLayers=12); a fixed count disables auto-fit. GPU natives jar only. --> <ai.gpuLayers>-1</ai.gpuLayers> <!-- Primary GPU index for the gpt-oss presets (the main-gpu flag). -1 = leave default. Matters on multi-GPU hosts: a Vulkan build enumerates every GPU (an integrated GPU may be device 0), so the default can pick the slower one. Set e.g. -Dai.mainGpu=1 to force the discrete GPU. A CUDA build only enumerates NVIDIA devices, so a single-NVIDIA host needs no setting. --> <ai.mainGpu>-1</ai.mainGpu> <!-- Explicit device selection for the gpt-oss presets (the device flag); comma-separated backend device names (e.g. Vulkan1). Empty = leave default. Takes precedence over ai.mainGpu. --> <ai.devices></ai.devices> <junit.version>6.1.3</junit.version> <hamcrest.version>3.0</hamcrest.version> <jmh.version>1.37</jmh.version> <jcstress.version>0.16</jcstress.version> <vmlens.version>1.2.28</vmlens.version> <errorprone.version>2.51.0</errorprone.version> <nullaway.version>0.14.3</nullaway.version> <!-- checker.version also drives the org.checkerframework:checker annotation-processor artifact below; the checker-qual dependency version itself is managed by the parent's <dependencyManagement> (see comment above <dependencies>). --> <checker.version>4.3.1</checker.version> <!-- jqwik / Lincheck are no longer dependencies of this module (both moved to srcmorph with the config package's tests); see srcmorph/pom.xml for the jqwik "DO NOT UPGRADE past 1.9.3" policy note (CLAUDE.md "jqwik prompt-injection in test output"). --> <archunit.version>1.5.1</archunit.version> <spotbugs.version>4.10.5.0</spotbugs.version> <lombok.version>1.18.48</lombok.version> <fb-contrib.version>7.7.4</fb-contrib.version> <findsecbugs.version>1.14.0</findsecbugs.version> <spotless.version>3.10.4</spotless.version> <palantir-java-format.version>2.103.0</palantir-java-format.version> <ai.index.output.directory>${project.basedir}/src/site/ai</ai.index.output.directory> <!-- The srcmorph-selftest profile's modelDirectory: every modelPath there is a file name relative to it, so the profile runs on another machine with -Dai.modelDir=/path/to/models, and a moved model drive is a one-line change here. A model kept somewhere else gets an absolute modelPath, which is used as it is. The default is the owner's model drive. --> <ai.modelDir>M:/Modelle</ai.modelDir> <!-- The srcmorph-selftest profile's profileDirectory: the prompt and fact-counter set its rules name by key (profiles/README.md). --> <ai.profileDir>${project.basedir}/../profiles/v3</ai.profileDir> <project.build.outputTimestamp>2026-11-02T17:45:12Z</project.build.outputTimestamp> </properties> <!-- slf4j-api / logback-classic / jspecify / checker-qual convergence pins now live in the parent's <dependencyManagement> (net.ladenthin:srcmorph-parent) so every reactor module shares them. --> <dependencies> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.jspecify</groupId> <artifactId>jspecify</artifactId> </dependency> <!-- Compile-only: nothing in this module imports these annotations, they exist for the Checker Framework processor. Scope `provided` is inherited from the parent's dependencyManagement and is what keeps them off a consumer's runtime classpath; see the comment there. --> <dependency> <groupId>org.checkerframework</groupId> <artifactId>checker-qual</artifactId> </dependency> <!-- The extracted core library: config/document/indexer/prompt/provider/support and the Mojo-visible framework-free API (incl. the net.ladenthin:llama JNI binding, which only the provider package touches). Compile scope: Mojo classes construct SourceFileIndexer, PackageIndexer, ProjectIndexer, the *Support classes, etc. directly. --> <dependency> <groupId>net.ladenthin</groupId> <artifactId>srcmorph</artifactId> <version>${project.version}</version> </dependency> <!-- Already pulled in transitively via srcmorph's compile-scope dependency, but declared explicitly here because PluginArchitectureTest imports org.slf4j.Logger directly (its loggersArePrivateStaticFinal ArchTest rule). Version is pinned in the parent's <dependencyManagement> for convergence. --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${maven.plugin.tools.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> <!-- net.jqwik / org.jetbrains.lincheck / ch.qos.logback are deliberately NOT declared here: after the srcmorph extraction, no test remaining in this module uses jqwik properties, Lincheck (AiGenerationKindLincheckTest moved to srcmorph with the config package), or a logback ListAppender (AiFieldGenerationSupportTest moved to srcmorph too). jqwik is still named as a string literal in PluginArchitectureTest's noTestFrameworksInProduction rule, which needs no dependency on the jar itself. --> <dependency> <groupId>com.tngtech.archunit</groupId> <artifactId>archunit-junit5</artifactId> <version>${archunit.version}</version> <scope>test</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> <!-- 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> <resources> <resource> <directory>${project.basedir}/src/main/resources</directory> </resource> <resource> <directory>${project.basedir}/..</directory> <targetPath>META-INF/third-party/net.ladenthin/${project.artifactId}</targetPath> <includes> <include>LICENSE</include> <include>THIRD_PARTY.md</include> </includes> </resource> </resources> <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.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.16.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>3.7.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.1</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-plugin-plugin</artifactId> <version>${maven.plugin.tools.version}</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.6.1</version> <configuration> <!-- argLine starts with @{argLine} so the JaCoCo agent (placed into the argLine property by jacoco:prepare-agent) survives via late property replacement; dropping it would detach the agent and break coverage. The remaining flags add cross-repo-standard test JVM diagnostics: a 2 GB heap cap, a heap dump on OutOfMemoryError into the working directory, and a JVM fatal-error log named per crashing PID. --> <!-- -XX:+EnableDynamicAgentLoading: silences the JDK 21 byte-buddy self-attach agent warning that intermittently corrupts Surefire's fork channel ("Corrupted channel ..." / bogus "timeout in the fork"). See workspace policy ci-test-diagnostics.md section 2.1: https://github.com/bernardladenthin/workspace/blob/main/policies/ci-test-diagnostics.md - root cause: https://github.com/raphw/byte-buddy/issues/1639 --> <argLine>@{argLine} -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=. -XX:ErrorFile=hs_err_pid%p.log -XX:+EnableDynamicAgentLoading</argLine> <!-- The vmlens interleaving smoke test is 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 it with `-Dtest=...`, which overrides this exclude. --> <excludes> <exclude>**/VmlensInterleavingSmokeTest.java</exclude> </excludes> <!-- Force classpath-mode test execution, matching the same setting (and rationale) in srcmorph/pom.xml and srcmorph-cli/pom.xml: this module's module-info.java declares a real (non-static) `requires net.ladenthin.srcmorph`, which is enough to make Surefire's module-path auto-detection patch test-classes into the named module — and that patched module then also needs every test-only dependency (e.g. archunit-junit5) explicitly readable, which module-info intentionally does not declare (it is release metadata for module-path consumers only; Maven itself always loads this plugin classpath-only). Classpath mode matches how this module is actually built/tested/consumed. --> <useModulePath>false</useModulePath> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.6.4</version> </plugin> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.8.16</version> </plugin> <plugin> <groupId>org.pitest</groupId> <artifactId>pitest-maven</artifactId> <version>1.30.1</version> </plugin> <plugin> <groupId>org.sonatype.central</groupId> <artifactId>central-publishing-maven-plugin</artifactId> <version>0.12.0</version> </plugin> </plugins> </pluginManagement> <plugins> <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-enforcer-plugin</artifactId> <executions> <execution> <id>enforce-maven</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>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <release>${maven.compiler.release}</release> <testRelease>${maven.compiler.testRelease}</testRelease> <showWarnings>true</showWarnings> <parameters>true</parameters> <compilerArgs> <!-- -Xlint:all surfaces every category of javac warning. Excluded categories: -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" (Error Prone's @GuardedBy is consumed by the EP javac plugin, not by a JSR-269 annotation processor) -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> <!-- 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> <!-- Skip CF analysis of the auto-generated HelpMojo (target/generated-sources/plugin/...). The plugin-tools-generated code is not under our control and has its own initialization patterns Maven handles via reflection. --> <arg>-AskipDefs=^net\.ladenthin\.srcmorph_maven_plugin\..*$</arg> <arg>-XDaddTypeAnnotationsToSymbol=true</arg> <arg>-XDcompilePolicy=simple</arg> <arg>--should-stop=ifError=FLOW</arg> <!-- XepExcludedPaths skips the auto-generated HelpMojo for Error Prone (parallels the -AskipDefs above for Checker Framework). The two remaining warnings on that file (StringSplitter) would otherwise break -Werror. --> <arg>-Xplugin:ErrorProne -XepExcludedPaths:.*/generated-sources/.* -Xep:NullAway:ERROR -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:ExcludedFieldAnnotations=org.apache.maven.plugins.annotations.Parameter,org.apache.maven.plugins.annotations.Component -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 plugin 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 Maven (which loads plugins classpath-only) continues to work unchanged. --> <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 / Lincheck 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 -Xep:IdentityBinaryExpression: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> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <!-- Must run at package (jar-no-fork's own default phase), NOT verify. maven-gpg-plugin's sign-artifacts execution (release profile) is bound to verify; package always runs before verify in the lifecycle, so the sources jar must be built and attached here to exist before signing runs. Binding this to verify put it in the SAME phase as gpg:sign, and — since the parent's inherited gpg execution ran first — gpg signed only the main jar + javadoc jar + pom, silently omitting the sources jar. Sonatype Central's deployment validation then rejected the whole bundle for a missing signature (caught on the first real release attempt; not visible in any dry run that passed -Dgpg.skip=true, which also skips the real execution-order interaction). --> <phase>package</phase> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <source>${maven.compiler.release}</source> <failOnError>true</failOnError> <failOnWarnings>true</failOnWarnings> <doclint>all</doclint> <sourceFileExcludes> <sourceFileExclude>**/HelpMojo.java</sourceFileExclude> </sourceFileExcludes> </configuration> <executions> <execution> <id>attach-javadocs</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> <configuration> <goalPrefix>srcmorph</goalPrefix> <!-- The floor the plugin is built and tested for, stated in plugin.xml (Maven 4 enforces it). Without these the descriptor took the maven-plugin-api version (3.10.0) and Java 11; plugin-it asserts both lines. --> <requiredMavenVersion>3.6.3</requiredMavenVersion> <requiredJavaVersion>1.8</requiredJavaVersion> </configuration> <executions> <execution> <id>default-descriptor</id> <goals> <goal>descriptor</goal> </goals> </execution> <execution> <id>help-goal</id> <goals> <goal>helpmojo</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> <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> <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.maven.srcmorph.mojo.AbstractAiIndexMojo</param> <param>net.ladenthin.maven.srcmorph.mojo.GenerateMojo</param> <param>net.ladenthin.maven.srcmorph.mojo.AggregatePackagesMojo</param> <param>net.ladenthin.maven.srcmorph.mojo.AggregateProjectMojo</param> <param>net.ladenthin.maven.srcmorph.mojo.CalibrateMojo</param> <param>net.ladenthin.maven.srcmorph.mojo.CheckMojo</param> <param>net.ladenthin.maven.srcmorph.mojo.RuleSection*</param> </targetClasses> <targetTests> <param>net.ladenthin.maven.srcmorph.*</param> </targetTests> <mutationThreshold>100</mutationThreshold> <timeoutConstant>30000</timeoutConstant> <parseSurefireConfig>false</parseSurefireConfig> <jvmArgs> <value>-Xmx2g</value> <value>-XX:+EnableDynamicAgentLoading</value> </jvmArgs> </configuration> </plugin> </plugins> </build> <profiles> <!-- The gpu-cuda / gpu-vulkan profiles (adding a GPU natives jar of net.ladenthin:llama) moved to srcmorph/pom.xml, since only that module's provider package depends on net.ladenthin:llama now. To index with a GPU-accelerated model, build srcmorph with that profile active first (e.g. `cd ../srcmorph && mvn install -P gpu-cuda`), then run this module's srcmorph-selftest profile as usual — the ai.gpuLayers / ai.mainGpu / ai.devices properties consumed below are unaffected and still live in this pom. The `release` profile (GPG signing + central-publishing-maven-plugin) now lives in the parent (net.ladenthin:srcmorph-parent) so a single `mvn -P release deploy` from the reactor root signs and publishes every module. --> <profile> <id>srcmorph-selftest</id> <build> <plugins> <plugin> <groupId>${project.groupId}</groupId> <artifactId>${project.artifactId}</artifactId> <version>${project.version}</version> <!-- Models, rules, profile and paths are srcmorph-selftest.yaml, the same file format as the CLI's; its ${ai.*} come from the properties above and -D. --> <configuration> <configurationFile>${project.basedir}/srcmorph-selftest.yaml</configurationFile> </configuration> <executions> <execution> <id>ai-generate</id> <phase>generate-resources</phase> <goals> <goal>generate</goal> </goals> </execution> <!-- Phase 2 reads the .ai.md tree phase 1 wrote, phase 3 the package summaries, so each is bound to a later lifecycle phase. --> <execution> <id>ai-aggregate-packages</id> <phase>process-resources</phase> <goals> <goal>aggregate-packages</goal> </goals> </execution> <execution> <id>ai-aggregate-project</id> <phase>prepare-package</phase> <goals> <goal>aggregate-project</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>vmlens</id> <build> <plugins> <plugin> <groupId>com.vmlens</groupId> <artifactId>vmlens-maven-plugin</artifactId> <configuration> <!-- Staged scope (one class for now): run vmlens interleaving analysis only on the minimal smoke test. 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>**/VmlensInterleavingSmokeTest.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> </profiles> </project>