<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>com.github.oshi</groupId>
    <artifactId>oshi-parent</artifactId>
    <version>7.5.0</version>
    <packaging>pom</packaging>

    <name>Operating System and Hardware Information</name>
    <description>A free native (JNA or FFM) Operating System and Hardware Information library for Java that aims to provide a
        cross-platform implementation to retrieve system information, such as OS version, processes, memory, CPU, disk, battery, etc.</description>
    <url>https://github.com/oshi/oshi</url>
    <inceptionYear>2010</inceptionYear>
    <organization>
        <name>oshi</name>
        <url>https://github.com/oshi/</url>
    </organization>
    <licenses>
        <license>
            <!-- SPDX-License-Identifier: MIT -->
            <name>MIT</name>
            <url>https://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>dbwiddis</id>
            <name>Daniel Widdis</name>
            <email>widdis@gmail.com</email>
            <organization>oshi.ooo</organization>
            <organizationUrl>https://github.com/dbwiddis/</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>oshi-common</module>
        <module>oshi-core</module>
        <module>oshi-demo</module>
    </modules>

    <scm>
        <connection>scm:git:ssh://git@github.com/oshi/oshi.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/oshi/oshi.git</developerConnection>
        <tag>oshi-parent-7.5.0</tag>
        <url>https://github.com/oshi/oshi.git</url>
    </scm>
    <issueManagement>
        <system>Github</system>
        <url>https://github.com/oshi/oshi/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Github</system>
        <url>https://github.com/oshi/oshi/actions</url>
    </ciManagement>
    <distributionManagement>
        <snapshotRepository>
            <id>central</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
        <site>
            <id>gh-pages</id>
            <name>OSHI GitHub Pages</name>
            <url>scm:git:ssh://git@github.com/oshi/oshi.git</url>
        </site>
    </distributionManagement>

    <properties>
        <copyright>2010 - 2026</copyright>
        <!-- Build Settings -->
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
        <maven.compiler.release>8</maven.compiler.release>
        <maven.compiler.testRelease>8</maven.compiler.testRelease>
        <!-- Release level for the FFM-based modules (oshi-core-ffm, oshi-benchmark). Defaults to the 25 baseline
        OSHI ships. Overridable on the command line (e.g. -Doshi.ffm.release=23) so the Coverity scan can compile the
        FFM code on an older JDK toolchain: cov-build 2024.12.1 cannot capture JDK 25 bytecode. OSHI's FFM code needs
        release 23+ (uses SymbolLookup.findOrThrow). Temporary until Coverity Scan ships a JDK 25-capable build tool. -->
        <oshi.ffm.release>25</oshi.ffm.release>
        <maven.min-version>3.6.3</maven.min-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- SonarCloud warned "Missing sonar.java.test.binaries" (less precise test-code analysis); declare each
        module's compiled test classes explicitly. -->
        <sonar.java.test.binaries>${project.build.testOutputDirectory}</sonar.java.test.binaries>
        <!-- native access enablement default -->
        <native.access.modules>ALL-UNNAMED</native.access.modules>
        <!-- Skip the JDK 17+/21 JNA aggregate report (oshi-demo) by default; the jna-aggregate profile enables it. -->
        <jna.aggregate.skip>true</jna.aggregate.skip>
        <!-- internal, see https://issues.apache.org/jira/browse/MNG-7038 -->
        <main.basedir>${maven.multiModuleProjectDirectory}</main.basedir>
        <!-- Dependency versions -->
        <!-- Users of the Spring Boot Starter Parent should include this
        property in their POM -->
        <jna.version>5.19.1</jna.version>
        <slf4j.version>2.0.18</slf4j.version>
        <osgi.slf4j.import.packages>org.slf4j;version="[1.7,3.0)"</osgi.slf4j.import.packages>
        <junit.version>6.1.3</junit.version>
        <!-- JUnit parallel-execution config; overridable per CI run (see OpenIndiana). -->
        <junit.parallel.executor-service>WORKER_THREAD_POOL</junit.parallel.executor-service>
        <junit.parallel.strategy>dynamic</junit.parallel.strategy>
        <junit.parallel.fixed.parallelism>2</junit.parallel.fixed.parallelism>
        <junit.parallel.fixed.max-pool-size>4</junit.parallel.fixed.max-pool-size>
        <hamcrest.version>3.0</hamcrest.version>
        <assertj.version>3.27.7</assertj.version>
        <!-- Compile versions -->
        <maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
        <maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
        <!-- Host platform for NullAway, the Error Prone check that enforces the JSpecify nullability
        annotations. Wired up behind the error-prone profile; see pom.xml profile "error-prone". -->
        <error-prone.version>2.50.0</error-prone.version>
        <!-- Error Prone plugin adding SLF4J-specific checks (placeholder/argument agreement, constant format
        strings, logger field shape). Registers itself through META-INF/services, so it only needs to be on the
        annotationProcessorPath; its checks are then configured with -Xep like any other. Compiled against an
        older error_prone_check_api than ${error-prone.version} but declares it compileOnly, so it contributes
        no transitive dependency; verified working against 2.50.0. -->
        <errorprone-slf4j.version>0.1.29</errorprone-slf4j.version>
        <maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
        <maven-enforcer-plugin.version>3.6.3</maven-enforcer-plugin.version>
        <restrict-imports-enforcer-rule.version>3.0.0</restrict-imports-enforcer-rule.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <maven-install-plugin.version>3.1.4</maven-install-plugin.version>
        <maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
        <maven-scm-publish-plugin.version>3.3.0</maven-scm-publish-plugin.version>
        <maven-site-plugin.version>3.22.0</maven-site-plugin.version>
        <maven-surefire-plugin.version>3.5.6</maven-surefire-plugin.version>
        <maven-fluido-skin.version>2.1.0</maven-fluido-skin.version>
        <!-- build plugins -->
        <git-commit-id-maven-plugin.version>10.0.0</git-commit-id-maven-plugin.version>
        <build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
        <maven-jar-plugin.version>3.5.1</maven-jar-plugin.version>
        <bnd-maven-plugin.version>7.3.0</bnd-maven-plugin.version>
        <maven-shade-plugin.version>3.6.2</maven-shade-plugin.version>
        <junit-platform-maven-plugin.version>1.1.8</junit-platform-maven-plugin.version>
        <!-- reporting plugins -->
        <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
        <checkstyle.config.location>config/checkstyle.xml</checkstyle.config.location>
        <checkstyle.suppressions.location>config/checkstyle-suppressions.xml</checkstyle.suppressions.location>
        <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
        <forbiddenapis.version>3.10</forbiddenapis.version>
        <!-- tools -->
        <maven-antrun-plugin.version>3.2.0</maven-antrun-plugin.version>
        <maven-assembly-plugin.version>3.8.0</maven-assembly-plugin.version>
        <maven-dependency-plugin.version>3.11.0</maven-dependency-plugin.version>
        <maven-release-plugin.version>3.3.1</maven-release-plugin.version>
        <central-publishing-maven-plugin.version>0.11.0</central-publishing-maven-plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
        <properties-maven-plugin.version>1.3.0</properties-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
        <sortpom-plugin.version>4.0.0</sortpom-plugin.version>
        <spotless-plugin.version>3.10.0</spotless-plugin.version>
        <jlibrehardwaremonitor.version>1.0.6</jlibrehardwaremonitor.version>
        <!-- JSpecify nullability annotations (@NullMarked/@Nullable). Compile-time metadata only: declared
        optional so it stays off consumers' transitive classpath, and imported optionally by OSGi. Four
        annotation classes, no transitive dependencies, Java 8 bytecode, Apache 2.0. -->
        <jspecify.version>1.0.1</jspecify.version>
        <nullaway.version>0.13.8</nullaway.version>
        <!-- report only -->
        <maven-jxr-plugin.version>3.6.0</maven-jxr-plugin.version>
        <maven-project-info-reports-plugin.version>3.9.0</maven-project-info-reports-plugin.version>
        <maven-surefire-report-plugin.version>3.5.6</maven-surefire-report-plugin.version>
        <taglist-maven-plugin.version>3.2.2</taglist-maven-plugin.version>
        <versions-maven-plugin.version>2.21.0</versions-maven-plugin.version>
        <!-- Misc. -->
        <sonar-maven-plugin.version>5.7.0.6970</sonar-maven-plugin.version>
        <dependency-check-maven.version>13.0.0</dependency-check-maven.version>
        <!-- OWASP dependency-check NVD tuning: treat cached data as fresh for a week (skips updates on a
             warm cache) and ride out NVD API throttling. See the NVD Cache Warmer and Site workflows. -->
        <dependency-check.nvdApiDelay>7500</dependency-check.nvdApiDelay>
        <dependency-check.nvdMaxRetryCount>50</dependency-check.nvdMaxRetryCount>
        <dependency-check.nvdValidForHours>168</dependency-check.nvdValidForHours>
        <japicmp-maven-plugin.version>0.26.1</japicmp-maven-plugin.version>
        <puppycrawl.checkstyle.version>13.11.0</puppycrawl.checkstyle.version>
        <m2e.lifecycle-mapping.version>1.0.0</m2e.lifecycle-mapping.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Core plugins -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven-clean-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <!-- Slightly faster builds, see
                        https://issues.apache.org/jira/browse/MCOMPILER-209 -->
                        <useIncrementalCompilation>false</useIncrementalCompilation>
                        <compilerArgs>
                            <!-- Suppress "source/target value 8 is obsolete" warning -->
                            <arg>-Xlint:-options</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
                <!-- Sonatype Provided Plugins -->
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${central-publishing-maven-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>central</publishingServerId>
                        <autoPublish>true</autoPublish>
                    </configuration>
                </plugin>
                <!-- Import and API rules -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>de.skuzzle.enforcer</groupId>
                            <artifactId>restrict-imports-enforcer-rule</artifactId>
                            <version>${restrict-imports-enforcer-rule.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <version>${forbiddenapis.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven-checkstyle-plugin.version}</version>
                    <configuration>
                        <consoleOutput>true</consoleOutput>
                        <failOnViolation>true</failOnViolation>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    </configuration>
                </plugin>
                <!-- Publishing -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                    <configuration>
                        <!-- don't deploy site with maven-site-plugin (instead
                        use scm publish during release) -->
                        <skipDeploy>true</skipDeploy>
                        <relativizeSiteLinks>false</relativizeSiteLinks>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.skins</groupId>
                            <artifactId>maven-fluido-skin</artifactId>
                            <version>${maven-fluido-skin.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-publish-plugin</artifactId>
                    <version>${maven-scm-publish-plugin.version}</version>
                    <configuration>
                        <checkoutDirectory>${user.home}/maven-sites/oshi</checkoutDirectory>
                        <scmBranch>gh-pages</scmBranch>
                        <skipDeletedFiles>true</skipDeletedFiles>
                        <tryUpdate>true</tryUpdate>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <argLine>-Xmx1024m
                            ${enable.native.access}</argLine>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <forkCount>4</forkCount>
                        <reuseForks>true</reuseForks>
                        <parallel>all</parallel>
                        <useUnlimitedThreads>true</useUnlimitedThreads>
                        <forkedProcessExitTimeoutInSeconds>120</forkedProcessExitTimeoutInSeconds>
                    </configuration>
                </plugin>
                <!-- Build Plugins -->
                <plugin>
                    <groupId>io.github.git-commit-id</groupId>
                    <artifactId>git-commit-id-maven-plugin</artifactId>
                    <version>${git-commit-id-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>de.sormuras.junit</groupId>
                    <artifactId>junit-platform-maven-plugin</artifactId>
                    <version>${junit-platform-maven-plugin.version}</version>
                    <extensions>true</extensions>
                    <!-- Replace surefire in 'test' phase. -->
                    <configuration>
                        <timeout>3600</timeout>
                        <isolation>NONE</isolation>
                        <parameters>
                            <junit.jupiter.execution.parallel.enabled>true</junit.jupiter.execution.parallel.enabled>
                            <junit.jupiter.execution.parallel.mode.default>concurrent</junit.jupiter.execution.parallel.mode.default>
                            <junit.jupiter.execution.parallel.config.executor-service>${junit.parallel.executor-service}</junit.jupiter.execution.parallel.config.executor-service>
                            <junit.jupiter.execution.parallel.config.strategy>${junit.parallel.strategy}</junit.jupiter.execution.parallel.config.strategy>
                            <junit.jupiter.execution.parallel.config.fixed.parallelism>${junit.parallel.fixed.parallelism}</junit.jupiter.execution.parallel.config.fixed.parallelism>
                            <junit.jupiter.execution.parallel.config.fixed.max-pool-size>${junit.parallel.fixed.max-pool-size}</junit.jupiter.execution.parallel.config.fixed.max-pool-size>
                        </parameters>
                        <executor>JAVA</executor>
                        <javaOptions>
                            <additionalOptions>
                                <jacoco>${jacoco.java.option}</jacoco>
                                <additionalOption>${enable.native.access}</additionalOption>
                            </additionalOptions>
                        </javaOptions>
                        <tweaks>
                            <failIfNoTests>false</failIfNoTests>
                        </tweaks>
                    </configuration>
                </plugin>
                <!-- Packaging types / tools -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                    <configuration>
                        <archive>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries combine.children="append">
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                                <Copyright>${copyright}</Copyright>
                                <Git-Revision>${git.commit.id}</Git-Revision>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <X-Compile-Source-JDK>${maven.compiler.release}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.release}</X-Compile-Target-JDK>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <!-- OSGi -->
                <plugin>
                    <groupId>biz.aQute.bnd</groupId>
                    <artifactId>bnd-maven-plugin</artifactId>
                    <version>${bnd-maven-plugin.version}</version>
                    <configuration>
                        <bnd><![CDATA[Export-Package: oshi.*;-noimport:=true
                        Import-Package: io.github.pandalxb.jlibrehardwaremonitor.*;resolution:=optional, ${osgi.slf4j.import.packages}, *
                        Bundle-SymbolicName: ${project.groupId}.${project.artifactId}
                        -snapshot: SNAPSHOT]]></bnd>
                    </configuration>
                </plugin>
                <!-- Reporting plugins -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                                <Copyright>${copyright}</Copyright>
                                <Git-Revision>${git.commit.id}</Git-Revision>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <X-Compile-Source-JDK>${maven.compiler.release}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.release}</X-Compile-Target-JDK>
                            </manifestEntries>
                        </archive>
                        <release>${java.specification.version}</release>
                        <source>${java.specification.version}</source>
                        <detectLinks>false</detectLinks>
                        <links>
                            <link>https://java-native-access.github.io/jna/${jna.version}/javadoc/</link>
                        </links>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <!-- Presence of javadoc is enforced by checkstyle's MissingJavadocType/MissingJavadocMethod,
                             which can be scoped to the API that matters. doclint keeps everything else: bad tags,
                             broken references, malformed HTML. Without -missing it also demands a comment on every
                             protected field of the C-struct mirrors and on every implicit constructor, which is
                             ~1500 warnings of no value to a reader. -->
                        <doclint>all,-missing</doclint>
                        <additionalJOptions>
                            <additionalJOption>-Xmaxwarns</additionalJOption>
                            <additionalJOption>1000</additionalJOption>
                            <additionalJOption>-Xmaxerrs</additionalJOption>
                            <additionalJOption>1000</additionalJOption>
                        </additionalJOptions>
                    </configuration>
                </plugin>
                <!-- Tools -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${maven-antrun-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven-release-plugin.version}</version>
                    <configuration>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <releaseProfiles>release</releaseProfiles>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <!-- override default site-deploy goal -->
                        <goals>deploy</goals>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                                <Copyright>${copyright}</Copyright>
                                <Git-Revision>${git.commit.id}</Git-Revision>
                                <Os-Name>${os.name}</Os-Name>
                                <Os-Arch>${os.arch}</Os-Arch>
                                <Os-Version>${os.version}</Os-Version>
                                <X-Compile-Source-JDK>${maven.compiler.release}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.release}</X-Compile-Target-JDK>

                                <!-- OSGi source header -->
                                <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
                                <Bundle-Name>${project.name}</Bundle-Name>
                                <Bundle-SymbolicName>${project.groupId}.${project.artifactId}.source</Bundle-SymbolicName>
                                <Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
                                <Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
                                <Eclipse-SourceBundle>${project.groupId}.${project.artifactId};version="${parsedVersion.osgiVersion}";roots:="."</Eclipse-SourceBundle>
                            </manifestEntries>
                        </archive>
                    </configuration>
                    <executions>
                        <!-- Here we override the super-pom attach-sources
                        execution id which calls sources:jar goal. That
                            goals forks the lifecycle, causing the generate-sources phase to be called
                        twice for the install goal. Starting with Maven
                            3.4.0 (https://issues.apache.org/jira/browse/MNG-5940) this is not needed
                        anymore. -->
                        <!-- except that OSSRH fails with no sources with this
                        excluded <execution> <id>attach-sources</id>
                            <phase>DISABLE_FORKED_LIFECYCLE_MSOURCES-13</phase> </execution> -->
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>properties-maven-plugin</artifactId>
                    <version>${properties-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>read-project-properties</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <files>
                                    <file>${main.basedir}/config/sonar-project.properties</file>
                                </files>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- External Tools -->
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>${spotless-plugin.version}</version>
                    <configuration>
                        <formats>
                            <format>
                                <includes>
                                    <include>**/*.md</include>
                                    <include>**/*.yml</include>
                                    <include>**/*.yaml</include>
                                </includes>
                                <excludes>
                                    <exclude>**/target/**</exclude>
                                </excludes>
                                <trimTrailingWhitespace />
                                <endWithNewline />
                                <indent>
                                    <spaces>true</spaces>
                                    <spacesPerTab>2</spacesPerTab>
                                </indent>
                            </format>
                            <format>
                                <includes>
                                    <include>**/*.xml</include>
                                </includes>
                                <excludes>
                                    <exclude>**/target/**</exclude>
                                </excludes>
                                <trimTrailingWhitespace />
                                <endWithNewline />
                                <indent>
                                    <spaces>true</spaces>
                                    <spacesPerTab>4</spacesPerTab>
                                </indent>
                            </format>
                        </formats>
                        <java>
                            <ratchetFrom>origin/master</ratchetFrom>
                            <removeUnusedImports />
                            <trimTrailingWhitespace />
                            <endWithNewline />
                            <licenseHeader>
                                <file>${main.basedir}/config/license-header.txt</file>
                            </licenseHeader>
                            <importOrder>
                                <order>\#,java,javax,org,com,oshi</order>
                            </importOrder>
                            <eclipse>
                                <file>${main.basedir}/config/OSHIJavaFormatConventions.xml</file>
                            </eclipse>
                        </java>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>compile</phase>
                        </execution>
                    </executions>
                </plugin>
                <!-- Report Only -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>${maven-jxr-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>${maven-surefire-report-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>taglist-maven-plugin</artifactId>
                    <version>${taglist-maven-plugin.version}</version>
                    <configuration>
                        <tagListOptions>
                            <tagClasses>
                                <tagClass>
                                    <displayName>FIXME Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>fixme</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                        <tag>
                                            <matchString>@fixme</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                                <tagClass>
                                    <displayName>Todo Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>todo</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                        <tag>
                                            <matchString>@todo</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                                <tagClass>
                                    <displayName>Deprecated Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>@deprecated</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                            </tagClasses>
                        </tagListOptions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin.version}</version>
                </plugin>
                <!-- Sonar -->
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${sonar-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${dependency-check-maven.version}</version>
                    <configuration>
                        <nvdApiDelay>${dependency-check.nvdApiDelay}</nvdApiDelay>
                        <nvdMaxRetryCount>${dependency-check.nvdMaxRetryCount}</nvdMaxRetryCount>
                        <nvdValidForHours>${dependency-check.nvdValidForHours}</nvdValidForHours>
                        <!-- Sonatype OSS Index auth via the `ossindex` server in .mvn/settings.xml
                             (Guide token as password). Warn-only so an OSS Index outage never fails a build. -->
                        <ossIndexServerId>ossindex</ossIndexServerId>
                        <ossIndexWarnOnlyOnRemoteErrors>true</ossIndexWarnOnlyOnRemoteErrors>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.siom79.japicmp</groupId>
                    <artifactId>japicmp-maven-plugin</artifactId>
                    <version>${japicmp-maven-plugin.version}</version>
                    <configuration>
                        <parameter>
                            <includes>
                                <include>@oshi.annotation.PublicApi</include>
                            </includes>
                            <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
                            <onlyModified>true</onlyModified>
                        </parameter>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Build Plugins -->
            <plugin>
                <groupId>io.github.git-commit-id</groupId>
                <artifactId>git-commit-id-maven-plugin</artifactId>
                <configuration>
                    <dotGitDirectory>.git</dotGitDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>git-commit-id</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>bnd-process</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>de.sormuras.junit</groupId>
                <artifactId>junit-platform-maven-plugin</artifactId>
            </plugin>
            <!-- Reporting Plugins -->
            <!-- Tools -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <configuration>
                    <rules>
                        <requireMavenVersion>
                            <version>${maven.min-version}</version>
                        </requireMavenVersion>
                        <bannedDependencies>
                            <excludes>
                                <exclude>junit:junit</exclude>
                                <exclude>org.hamcrest:hamcrest-core</exclude>
                            </excludes>
                        </bannedDependencies>
                    </rules>
                </configuration>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>enforce-clean</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>pre-clean</phase>
                    </execution>
                    <execution>
                        <id>enforce-site</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>pre-site</phase>
                    </execution>
                    <execution>
                        <id>ban-transitive-imports</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <rules>
                                <RestrictImports>
                                    <reason>Disallow dependencies not on module
                                        path</reason>
                                    <includeTestCode>true</includeTestCode>
                                    <bannedImports>
                                        <!-- Disallow all imports except
                                        explicitly allowed -->
                                        <bannedImport>**</bannedImport>
                                    </bannedImports>
                                    <allowedImports>
                                        <!-- Allow oshi itself :-) -->
                                        <allowedImport>oshi.**</allowedImport>
                                        <!-- Allow core Java usage -->
                                        <allowedImport>java.**</allowedImport>
                                        <!-- Allow known dependencies -->
                                        <allowedImport>com.sun.jna.**</allowedImport>
                                        <allowedImport>io.github.pandalxb.jlibrehardwaremonitor.**</allowedImport>
                                        <allowedImport>org.jspecify.annotations.**</allowedImport>
                                        <allowedImport>org.slf4j.**</allowedImport>
                                        <allowedImport>org.junit.jupiter.api.**</allowedImport>
                                        <allowedImport>static org.hamcrest.**</allowedImport>
                                    </allowedImports>
                                    <!-- No restrictions on oshi-demo or
                                    oshi-benchmark -->
                                    <exclusions>
                                        <exclusion>oshi.demo.**</exclusion>
                                        <exclusion>oshi.benchmark.**</exclusion>
                                        <exclusion>oshi.comparison.**</exclusion>
                                        <exclusion>oshi.metrics.**</exclusion>
                                    </exclusions>
                                </RestrictImports>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
                <configuration>
                    <failOnUnsupportedJava>false</failOnUnsupportedJava>
                    <bundledSignatures>
                        <bundledSignature>jdk-unsafe</bundledSignature>
                        <bundledSignature>jdk-deprecated</bundledSignature>
                        <bundledSignature>jdk-non-portable</bundledSignature>
                        <bundledSignature>jdk-reflection</bundledSignature>
                        <bundledSignature>jdk-system-out</bundledSignature>
                    </bundledSignatures>
                    <signaturesFiles>
                        <signaturesFile>${main.basedir}/config/forbidden-apis.txt</signaturesFile>
                    </signaturesFiles>
                    <suppressAnnotations>
                        <suppressAnnotation>oshi.annotation.SuppressForbidden</suppressAnnotation>
                    </suppressAnnotations>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                            <goal>testCheck</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.ekryd.sortpom</groupId>
                <artifactId>sortpom-maven-plugin</artifactId>
                <version>${sortpom-plugin.version}</version>
                <configuration>
                    <createBackupFile>false</createBackupFile>
                    <lineSeparator>\n</lineSeparator>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <sortDependencies>scope</sortDependencies>
                    <nrOfIndentSpace>4</nrOfIndentSpace>
                    <expandEmptyElements>false</expandEmptyElements>
                    <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Code Coverage -->
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/annotation/**</exclude>
                        <exclude>**/benchmark/**</exclude>
                        <exclude>**/demo/**</exclude>
                        <!-- FFM mapping layer: anything that inherits ForeignFunctions, plus the
                             tightly-coupled struct/constant types they import. Mirrors the JNA
                             exclusion below. Util classes (oshi.ffm.util.*) and the public
                             entry point (oshi.ffm.SystemInfo) stay in coverage. -->
                        <exclude>**/ffm/common/**</exclude>
                        <exclude>**/ffm/platform/**</exclude>
                        <exclude>**/ffm/ForeignFunctions*</exclude>
                        <exclude>**/ffm/NativeHandle*</exclude>
                        <!-- JNA mapping layer: same shape as the FFM block above. Util classes
                             (oshi.jna.util.*) stay in coverage. -->
                        <exclude>**/jna/common/**</exclude>
                        <exclude>**/jna/platform/**</exclude>
                        <exclude>**/jna/ByRef*</exclude>
                        <exclude>**/jna/Struct*</exclude>
                        <!-- All Unix platforms now have aggregate coverage + codecov upload: FreeBSD /
                             OpenBSD / OpenIndiana (Solaris x86) on the permanent unix CI jobs (JDK 25,
                             oshi-benchmark aggregator); AIX and Solaris SPARC on the cfarm CI jobs; and
                             NetBSD and DragonFly BSD on their unix CI jobs. NetBSD, DragonFly, and Solaris
                             SPARC are capped below JDK 25 (no FFM), so they aggregate via the oshi-demo
                             `jna-aggregate` profile instead of oshi-benchmark. Their oshi-core JNA classes
                             (hardware/platform, software/os, util/platform under unix/<os>) are therefore
                             covered and not excluded; the oshi-common native-free base classes under
                             `*/common/*` are covered on the native-free jobs. -->

                        <!-- Hardware-dependent: no GPU/sensors/battery on CI runners -->
                        <exclude>**/gpu/NvmlUtil*</exclude>
                        <exclude>**/gpu/AdlUtil*</exclude>
                        <exclude>**/MacGpuStats*</exclude>
                        <exclude>**/WindowsGpuStats*</exclude>
                        <exclude>**/LinuxGpuStatsJNA*</exclude>
                        <exclude>**/LinuxGpuStatsFFM*</exclude>
                        <exclude>**/IOReportClient*</exclude>
                        <exclude>**/SmcUtil*</exclude>
                        <exclude>**/MacSensors*</exclude>
                        <exclude>**/WindowsSensors*</exclude>
                        <exclude>**/MacPowerSource*</exclude>
                        <exclude>**/WindowsPowerSource*</exclude>
                        <exclude>**/LinuxPowerSource*</exclude>
                        <exclude>**/FreeBsdPowerSource*</exclude>
                        <exclude>**/OpenBsdPowerSource*</exclude>
                        <exclude>**/SolarisPowerSource*</exclude>
                        <!-- Systemd/utmp fallback paths: CI always succeeds on first path -->
                        <exclude>**/driver/linux/WhoJNA*</exclude>
                        <exclude>**/driver/linux/WhoFFM*</exclude>
                        <!-- Windows Graphics: requires real GPU in VM -->
                        <exclude>**/WindowsGraphicsCardJNA*</exclude>
                        <exclude>**/WindowsGraphicsCardFFM*</exclude>
                        <!-- Windows Storage Spaces: requires configured storage pools -->
                        <exclude>**/WindowsLogicalVolumeGroupJNA*</exclude>
                        <exclude>**/WindowsLogicalVolumeGroupFFM*</exclude>
                        <!-- USB enumeration: needs real device tree, CI has minimal -->
                        <exclude>**/LinuxUsbDeviceJNA*</exclude>
                        <exclude>**/LinuxUsbDeviceFFM*</exclude>
                        <exclude>**/WindowsUsbDeviceJNA*</exclude>
                        <exclude>**/WindowsUsbDeviceFFM*</exclude>
                        <exclude>**/MacUsbDeviceJNA*</exclude>
                        <exclude>**/MacUsbDeviceFFM*</exclude>
                        <!-- CUPS: requires print service -->
                        <exclude>**/CupsPrinterJNA*</exclude>
                        <exclude>**/CupsPrinterFFM*</exclude>
                        <exclude>**/CupsFunctions*</exclude>
                        <!-- Windows WMI infrastructure: tested indirectly -->
                        <exclude>**/WmiUtil*</exclude>
                        <exclude>**/WmiQueryHandler*</exclude>
                        <!-- Windows sessions/devices: requires active RDP/device tree -->
                        <exclude>**/SessionWtsData*</exclude>
                        <exclude>**/DeviceTree*</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <!-- Prepare execution with Surefire -->
                    <execution>
                        <id>pre-unit-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <propertyName>jacoco.java.option</propertyName>
                        </configuration>
                    </execution>
                    <!-- Generate report after tests are run -->
                    <execution>
                        <id>post-unit-test</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <phase>test</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>${surefireArgLine}</argLine>
                    <includes>
                        <include>**/*Test.java</include>
                        <include>**/*Tests.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>run-unit-tests</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${puppycrawl.checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <!-- Delete all from target but not target itself -->
                    <excludeDefaultDirectories>true</excludeDefaultDirectories>
                    <filesets>
                        <fileset>
                            <directory>${project.build.directory}</directory>
                            <includes>
                                <include>**/*</include>
                            </includes>
                        </fileset>
                    </filesets>
                    <force>true</force>
                </configuration>
            </plugin>
            <!-- Sonatype Provided Plugins -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <!-- Local-only JMH harness with no consumer value; keeping it out of the release also
                    keeps us under Sonatype's per-organization monthly publishing limits. Matched on
                    artifactId only, and silent when it matches, so verify the staged bundle after edits. -->
                    <excludeArtifacts>
                        <excludeArtifact>oshi-benchmark</excludeArtifact>
                    </excludeArtifacts>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <configuration>
                    <!-- Reporting plugins do not inherit build/pluginManagement
                         config, so repeat the NVD + OSS Index settings here. -->
                    <nvdApiDelay>${dependency-check.nvdApiDelay}</nvdApiDelay>
                    <nvdMaxRetryCount>${dependency-check.nvdMaxRetryCount}</nvdMaxRetryCount>
                    <nvdValidForHours>${dependency-check.nvdValidForHours}</nvdValidForHours>
                    <ossIndexServerId>ossindex</ossIndexServerId>
                    <ossIndexWarnOnlyOnRemoteErrors>true</ossIndexWarnOnlyOnRemoteErrors>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <!-- Eclipse IDE only: lifecycle-mapping is not in Maven Central -->
        <profile>
            <id>m2e</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>${m2e.lifecycle-mapping.version}</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-enforcer-plugin</artifactId>
                                                <versionRange>[1.0.0,)</versionRange>
                                                <goals>
                                                    <goal>enforce</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <!-- for oshi-core: enable-native-access switch not
        available before JDK16 -->
        <profile>
            <id>pre-java16</id>
            <activation>
                <jdk>[1.8,16)</jdk>
            </activation>
            <properties>
                <enable.native.access />
            </properties>
        </profile>
        <profile>
            <id>post-java16</id>
            <activation>
                <jdk>[16,)</jdk>
            </activation>
            <properties>
                <enable.native.access>--enable-native-access=${native.access.modules}</enable.native.access>
            </properties>
        </profile>
        <!-- Java 17+ profile -->
        <profile>
            <id>java17</id>
            <activation>
                <jdk>[17,)</jdk>
            </activation>
            <modules>
                <module>oshi-metrics</module>
            </modules>
        </profile>
        <!-- Java 25+ profile -->
        <profile>
            <id>java25</id>
            <activation>
                <jdk>[25,)</jdk>
            </activation>
            <!-- Only include ffm, benchmark, and dist modules on Java 25+ -->
            <modules>
                <module>oshi-core-ffm</module>
                <module>oshi-benchmark</module>
                <module>oshi-dist</module>
            </modules>
        </profile>
        <!-- Coverity scan profile. The free Coverity Scan tier serves cov-build 2024.12.1, which cannot capture JDK 25
        bytecode, so the scan must run on an older JDK than the [25,) modules require. Activate with -Pcoverity to pull
        the FFM and benchmark modules into the reactor on a pre-25 JDK, paired with -Doshi.ffm.release=23 to lower their
        compile target (dist is excluded: it is ignored by the scan and only assembles on the full Java 25 build).
        Temporary until Coverity Scan ships a JDK 25-capable build tool, after which the scan can run straight on 25. -->
        <profile>
            <id>coverity</id>
            <modules>
                <module>oshi-core-ffm</module>
                <module>oshi-benchmark</module>
            </modules>
        </profile>
        <!-- Compiles against the oldest supported SLF4J 1.x API to catch accidental
             use of SLF4J 2.0-only Logger methods (atLevel, isEnabledForLevel, etc.)
             that would break consumers pinning an older slf4j-api on the runtime
             classpath. Use: mvnw -Pverify-slf4j-17 clean compile -->
        <profile>
            <id>verify-slf4j-17</id>
            <properties>
                <slf4j.version>1.7.36</slf4j.version>
            </properties>
        </profile>
        <profile>
            <!-- Activates oshi-benchmark tests and aggregate JaCoCo report.
                 Use: mvnw test -Paggregate-coverage
                 The profile is defined here as a placeholder; oshi-benchmark
                 overrides maven.test.skip to enable its comparison tests. -->
            <id>aggregate-coverage</id>
        </profile>
        <profile>
            <!-- JDK 17+/21 aggregate JaCoCo report over oshi-common + oshi-core (JNA), without FFM.
                 Use: mvnw test -Pjna-aggregate
                 For platforms capped below JDK 25 that cannot build oshi-core-ffm/oshi-benchmark
                 (NetBSD JDK 21, Solaris SPARC JDK 17). Enables the report-aggregate execution in
                 oshi-demo (which depends on oshi-core); the aggregate lands at
                 oshi-demo/target/site/jacoco-aggregate/jacoco.xml. -->
            <id>jna-aggregate</id>
            <properties>
                <jna.aggregate.skip>false</jna.aggregate.skip>
            </properties>
        </profile>
        <profile>
            <!-- Wires Error Prone into the compiler, the host platform NullAway (an Error Prone
            check) uses to enforce the JSpecify nullability annotations. NullAway runs at ERROR, so
            a signature that contradicts its annotations blocks the build; the codebase reports zero
            findings as of #3636. WARNING-severity findings from other checks don't block, and
            accumulate for ongoing triage. Requires JDK 21+ to run (independent of the release target being compiled) and
            the JPMS add-exports/add-opens flags in .mvn/jvm.config. oshi-benchmark opts out (see
            its own pom.xml) - its maven-compiler-plugin config forks a separate javac process for
            its JDK toolchain, and a forked invocation doesn't preserve a multi-option -Xplugin
            value as one token the way in-process compilation does, breaking Error Prone's own
            "-Xep:Check:OFF"-style flags; it's also JMH-only and never carries JSpecify
            annotations, so it isn't worth the extra plumbing to fix. -->
            <id>error-prone</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <compilerArgs>
                                <arg>-Xlint:-options</arg>
                                <!-- javac's default -Xmaxwarns is 100 per module; Error Prone's findings are
                                javac warnings, so without this a module with more findings than that silently
                                drops the rest with no indication anything was truncated. -Xmaxerrs is the same
                                cap for the checks raised to ERROR, NullAway among them, and truncates just as
                                silently: a survey of oshi-common reported exactly 100 findings until it was set. -->
                                <arg>-Xmaxwarns</arg>
                                <arg>100000</arg>
                                <arg>-Xmaxerrs</arg>
                                <arg>100000</arg>
                                <arg>-XDcompilePolicy=simple</arg>
                                <arg>--should-stop=ifError=FLOW</arg>
                                <!-- MissingSummary demands a prose summary fragment distinct from the @return
                                block; Checkstyle's Missing*Javadoc checks don't require that phrasing, and the
                                project doesn't want to enforce it separately via Error Prone.

                                Everything below :ERROR defaults to WARNING severity, but the entire backlog for
                                these specific checks is zero across the reactor as of the #3594-3605 triage.
                                Escalating them turns a regression in any one of these categories into a build
                                failure, via the same javac behavior that already blocks the build on Error
                                Prone's own ERROR-severity checks - without reaching for -Werror, which would
                                fail on every javac warning, including several lint categories nothing here has
                                ever triaged.

                                The Slf4j* checks come from the errorprone-slf4j plugin rather than
                                error_prone_core, and unlike core's defaults three of them (PlaceholderMismatch,
                                FormatShouldBeConst, DoNotLogMessageOfExceptionExplicitly) already default to
                                ERROR; the :ERROR below is therefore explicit-not-escalating for those, and a
                                genuine escalation for LoggerShouldBePrivate/ShouldBeFinal/IllegalPassedClass,
                                whose backlog was zero when the plugin was adopted.

                                Two are OFF as findings the project rejects rather than a backlog to drain:
                                LoggerShouldBeNonStatic fires on all ~200 `private static final Logger LOG`
                                fields, whose staticness is deliberate, and SignOnlyFormat only ever flagged the
                                horizontal-rule separator lines the SystemInfoTest mains print.

                                DoNotLogMessageOfExceptionExplicitly spent one release cycle at WARN while its
                                74-site backlog was drained; every log call now passes the throwable rather than
                                its message, so it is back at the plugin's default ERROR. Note the severity token
                                Error Prone accepts is WARN, not WARNING. -->
                                <arg>-Xplugin:ErrorProne -Xep:InlineMeSuggester:OFF -Xep:DoNotCallSuggester:OFF -Xep:MissingSummary:OFF -Xep:StringSplitter:ERROR -Xep:EnumOrdinal:ERROR -Xep:OperatorPrecedence:ERROR -Xep:MixedMutabilityReturnType:ERROR -Xep:ReferenceEquality:ERROR -Xep:BoxingComparator:ERROR -Xep:NarrowCalculation:ERROR -Xep:LongDoubleConversion:ERROR -Xep:IntLiteralCast:ERROR -Xep:UnnecessaryLongToIntConversion:ERROR -Xep:IntLongMath:ERROR -Xep:BadImport:ERROR -Xep:ModifyCollectionInEnhancedForLoop:ERROR -Xep:EqualsGetClass:ERROR -Xep:DuplicateBranches:ERROR -Xep:InconsistentCapitalization:ERROR -Xep:NonApiType:ERROR -Xep:InvalidParam:ERROR -Xep:EffectivelyPrivate:ERROR -Xep:ImmutableEnumChecker:ERROR -Xep:StatementSwitchToExpressionSwitch:ERROR -Xep:UnnecessaryLambda:ERROR -Xep:UnnecessaryParentheses:ERROR -Xep:AssignmentExpression:ERROR -Xep:UnusedVariable:ERROR -Xep:PatternMatchingInstanceof:ERROR -Xep:EscapedEntity:ERROR -Xep:NotJavadoc:ERROR -Xep:AlmostJavadoc:ERROR -Xep:InvalidInlineTag:ERROR -Xep:InlineFormatString:ERROR -Xep:Slf4jLoggerShouldBeNonStatic:OFF -Xep:Slf4jSignOnlyFormat:OFF -Xep:Slf4jDoNotLogMessageOfExceptionExplicitly:ERROR -Xep:Slf4jPlaceholderMismatch:ERROR -Xep:Slf4jFormatShouldBeConst:ERROR -Xep:Slf4jLoggerShouldBePrivate:ERROR -Xep:Slf4jLoggerShouldBeFinal:ERROR -Xep:Slf4jIllegalPassedClass:ERROR -Xep:NullAway:ERROR -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:JSpecifyMode=true -XepOpt:NullAway:HandleTestAssertionLibraries=true</arg>
                            </compilerArgs>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>${error-prone.version}</version>
                                </path>
                                <path>
                                    <groupId>com.uber.nullaway</groupId>
                                    <artifactId>nullaway</artifactId>
                                    <version>${nullaway.version}</version>
                                </path>
                                <path>
                                    <groupId>jp.skypencil.errorprone.slf4j</groupId>
                                    <artifactId>errorprone-slf4j</artifactId>
                                    <version>${errorprone-slf4j.version}</version>
                                </path>
                            </annotationProcessorPaths>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>checks</id>
            <build>
                <plugins>
                    <!-- Reporting Plugins -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- External Tools -->
                    <plugin>
                        <groupId>org.sonarsource.scanner.maven</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sonar</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <rule>
                                            <element>BUNDLE</element>
                                            <limits>
                                                <limit>
                                                    <counter>COMPLEXITY</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>${jacoco.minimum.coverage}</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <configuration>
                            <nvdMaxRetryCount>${dependency-check.nvdMaxRetryCount}</nvdMaxRetryCount>
                            <nvdApiDelay>${dependency-check.nvdApiDelay}</nvdApiDelay>
                            <nvdValidForHours>${dependency-check.nvdValidForHours}</nvdValidForHours>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sonar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonarsource.scanner.maven</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <legacyMode>true</legacyMode>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <phase>verify</phase>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                    <!-- GPG 2.1 requires pinentry-mode to be
                                    set to loopback in order to pick up the
                                    gpg.passphrase
                                        value defined in Maven settings.xml. -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- deploy site with maven-scm-publish-plugin -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-publish-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>scm-publish</id>
                                <goals>
                                    <goal>publish-scm</goal>
                                </goals>
                                <phase>site-deploy</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
