<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2006 Google, Inc. All rights reserved.

This program is licensed to you under the Apache License Version 2.0,
and you may not use this file except in compliance with the Apache License Version 2.0.
You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing,
software distributed under the Apache License Version 2.0 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.airlift</groupId>
        <artifactId>airbase</artifactId>
        <version>405</version>
    </parent>

    <groupId>io.airlift</groupId>
    <artifactId>guice-parent</artifactId>
    <version>10</version>

    <packaging>pom</packaging>

    <name>Google Guice</name>

    <description>Guice is a lightweight dependency injection framework for Java 25 and above</description>

    <url>https://github.com/google/guice</url>
    <inceptionYear>2006</inceptionYear>

    <organization>
        <name>Google, Inc.</name>
        <url>http://www.google.com</url>
    </organization>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <mailingLists>
        <mailingList>
            <name>Guice Users List</name>
            <subscribe>http://groups.google.com/group/google-guice/subscribe</subscribe>
            <unsubscribe>http://groups.google.com/group/google-guice/subscribe</unsubscribe>
            <post>http://groups.google.com/group/google-guice/post</post>
            <archive>http://groups.google.com/group/google-guice/topics</archive>
        </mailingList>
    </mailingLists>

    <modules>
        <module>bom</module>
        <module>core</module>
        <module>extensions</module>
    </modules>

    <scm>
        <connection>scm:git:git://github.com/airlift/guice.git</connection>
        <developerConnection>scm:git:git@github.com:airlift/guice.git</developerConnection>
        <tag>10</tag>
        <url>https://github.com/airlift/guice/tree/master</url>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/google/guice/issues/</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github.com/google/guice/actions</url>
    </ciManagement>

    <properties>
        <!--
     | The spec version of the public Guice API
    -->
        <guice.api.version>1.4</guice.api.version>
        <project.build.targetJdk>25</project.build.targetJdk>
        <!--
     | SpotBugs stays off: its 102 findings on this tree are dominated by CT_CONSTRUCTOR_THROW
     | (finalizer-attack hardening, moot since JDK 18 disabled finalization), the deliberate
     | com.google.inject.Provider naming, and by-design synchronization in AbstractModule.
     | Everything else in the extended suite (airstyle, checkstyle, modernizer,
     | duplicate-finder) runs and fails the build.
    -->
        <air.check.skip-spotbugs>true</air.check.skip-spotbugs>
        <!--
     | PMD is off for a different reason: airbase 399's pmd configuration references PMD 5-era
     | ruleset paths (/rulesets/java/basic.xml) that the PMD resolved here no longer ships, so the
     | plugin fails on configuration, not on findings. Nothing this pom can fix.
    -->
        <air.check.skip-pmd>true</air.check.skip-pmd>
        <!--
     | The last stable release version id, used for generating API diffs between released versions
    -->
        <guice.lastStableRelease>7.0.0</guice.lastStableRelease>
        <air.check.fail-modernizer>true</air.check.fail-modernizer>
        <air.check.skip-license>true</air.check.skip-license>

        <!-- do not run tests on release -->
        <air.release.preparation-goals>clean verify -DskipTests</air.release.preparation-goals>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>jakarta.inject</groupId>
                <artifactId>jakarta.inject-tck</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>org.jspecify</groupId>
                <artifactId>jspecify</artifactId>
                <version>1.0.1</version>
            </dependency>
            <dependency>
                <groupId>com.google.truth</groupId>
                <artifactId>truth</artifactId>
                <version>1.4.5</version>
                <scope>test</scope>
            </dependency>
            <!--
     | junit:junit is kept for the junit.framework types alone: the Jakarta @Inject TCK is
     | published as a JUnit 3 TestSuite that we cannot change. Nothing executes JUnit 3 or
     | JUnit 4 tests any more, so there is no vintage engine.
    -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
                <exclusions>
                    <!-- hamcrest-core 1.3 duplicates the org.hamcrest classes we get from
                         org.hamcrest:hamcrest 3.0 -->
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>3.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.opentest4j</groupId>
                <artifactId>opentest4j</artifactId>
                <version>1.3.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opentest4j</groupId>
            <artifactId>opentest4j</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>${project.basedir}/src</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <filtering>false</filtering>
                <directory>${project.basedir}/test</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
        </testResources>
        <pluginManagement>
            <plugins>
                <!--
         | Modernizer runs with the version and executions that airbase declares; this entry only
         | adds exclusions for rules that do not apply to this vendored tree. Every remaining
         | finding has been fixed, so failures are real regressions.
        -->
                <plugin>
                    <groupId>org.gaul</groupId>
                    <artifactId>modernizer-maven-plugin</artifactId>
                    <configuration>
                        <exclusionPatterns>
                            <!--
                 | "Prefer jakarta.inject.Provider": false positive. com.google.inject.Provider
                 | is Guice's own public API - this codebase defines it and must keep using it.
                -->
                            <exclusionPattern>com/google/inject/Provider.*</exclusionPattern>
                        </exclusionPatterns>
                        <ignoreClassNamePatterns>
                            <!--
                 | HttpServletRequest.getRequestURL() is specified to return StringBuffer, and
                 | every StringBuffer constructor is flagged, so this wrapper cannot comply.
                -->
                            <ignoreClassNamePattern>com/google/inject/servlet/ManagedServletPipeline\$RequestDispatcherRequestWrapper</ignoreClassNamePattern>
                        </ignoreClassNamePatterns>
                    </configuration>
                </plugin>
                <!--
         | Use 'mvn license:format -N' at top of project to add missing headers
        -->
                <!--
         | Standard LICENSE and NOTICE files
        -->
                <plugin>
                    <artifactId>maven-remote-resources-plugin</artifactId>
                    <version>3.3.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>process</goal>
                            </goals>
                            <configuration>
                                <resourceBundles>
                                    <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                                </resourceBundles>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <trimStackTrace>false</trimStackTrace>
                        <!--
             | The aggregator modules carry no tests of their own.
            -->
                        <failIfNoTests>false</failIfNoTests>
                    </configuration>
                    <executions>
                        <execution>
                            <id>stack-traces-off</id>
                            <goals>
                                <goal>test</goal>
                            </goals>
                            <phase>test</phase>
                            <configuration>
                                <argLine>-Dguice_include_stack_traces=OFF</argLine>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-test</id>
                            <goals>
                                <goal>test</goal>
                            </goals>
                            <phase>test</phase>
                            <configuration>
                                <argLine>-Dguice_include_stack_traces=ONLY_FOR_DECLARING_SOURCE</argLine>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <!--  Exclude to mirror ant build -->
                            <addMavenDescriptor>false</addMavenDescriptor>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <doclint>html,syntax</doclint>
                        <source>25</source>
                        <author>false</author>
                        <protected>true</protected>
                        <links>
                            <link>https://guava.dev/releases/snapshot-jre/api/docs/</link>
                            <link>https://tomcat.apache.org/tomcat-5.5-doc/servletapi/</link>
                        </links>
                        <excludePackageNames>com.google.inject.internal:com.google.inject.internal.*</excludePackageNames>
                        <groups>
                            <group>
                                <title>Guice Core</title>
                                <packages>com.google.inject:com.google.inject.util:com.google.inject.spi:com.google.inject.name:com.google.inject.matcher:com.google.inject.binder:com.google.inject.multibindings</packages>
                            </group>
                            <group>
                                <title>Servlet Extension</title>
                                <packages>com.google.inject.servlet</packages>
                            </group>
                            <group>
                                <title>AssistedInject Extension</title>
                                <packages>com.google.inject.assistedinject</packages>
                            </group>
                            <group>
                                <title>ThrowingProviders Extension</title>
                                <packages>com.google.inject.throwingproviders</packages>
                            </group>
                            <group>
                                <title>Test Libraries Extension</title>
                                <packages>com.google.inject.testing.*</packages>
                            </group>
                            <group>
                                <title>Grapher Extension</title>
                                <packages>com.google.inject.grapher:com.google.inject.grapher.*</packages>
                            </group>
                            <group>
                                <title>JMX Extension</title>
                                <packages>com.google.inject.tools.jmx</packages>
                            </group>
                        </groups>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                                <goal>test-jar</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.spf4j</groupId>
                    <artifactId>spf4j-jdiff-maven-plugin</artifactId>
                    <version>8.10.0</version>
                    <configuration>
                        <destDir>${project.reporting.outputDirectory}/api-diffs/${project.artifactId}</destDir>
                        <versionRange>[${guice.lastStableRelease}],[${project.version}]</versionRange>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <!--
     | Ant-style directories
    -->
        <sourceDirectory>${project.basedir}/src</sourceDirectory>
        <testSourceDirectory>${project.basedir}/test</testSourceDirectory>
    </build>
</project>
