mirror of
https://github.com/google/guice.git
synced 2024-04-21 12:32:36 +00:00
* Bump minimum JRE to 11 (from 8).
* Change testing matrix from {8,11,15,17} to {11,17,21-ea}. (Except the bazel build has trouble parsing "21-ea" as a java version, so s/21-ea/20 for bazel.)
* Also test on macos (but only with jdk17). (Attempted to test on windows too, but there's issues right now.)
* Cleanup the POMs a little bit (remove unused mailing list reference, fix CI link)
* Bump bazel version to 6.2.0, otherwise the tests fail b/c they try to set a security manager (see https://github.com/bazelbuild/bazel/issues/14502, which was fixed in https://github.com/bazelbuild/bazel/commit/7556e1107b666d10b660470a571631463c7eb4ec, which was cherrypicked into the 6.2.0 release). This also required suppressing the "BanJNDI" errorprone check in the JNDI extension, which was also added to 6.2.0. (A future change should probably just remove the JNDI extension altogether.)
PiperOrigin-RevId: 532849632
301 lines
9.4 KiB
XML
301 lines
9.4 KiB
XML
<?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 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>com.google.inject</groupId>
|
|
<artifactId>guice-parent</artifactId>
|
|
<version>7.0.1-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>guice</artifactId>
|
|
|
|
<name>Google Guice - Core Library</name>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>jakarta.inject</groupId>
|
|
<artifactId>jakarta.inject-api</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>aopalliance</groupId>
|
|
<artifactId>aopalliance</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.errorprone</groupId>
|
|
<artifactId>error_prone_annotations</artifactId>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<!--
|
|
| ASM is embedded by default by the JarJar build profile
|
|
-->
|
|
<dependency>
|
|
<groupId>org.ow2.asm</groupId>
|
|
<artifactId>asm</artifactId>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<!--
|
|
| Test dependencies
|
|
-->
|
|
<dependency>
|
|
<groupId>jakarta.inject</groupId>
|
|
<artifactId>jakarta.inject-tck</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava-testlib</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>biz.aQute</groupId>
|
|
<artifactId>bnd</artifactId>
|
|
<version>0.0.384</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.felix</groupId>
|
|
<artifactId>org.apache.felix.framework</artifactId>
|
|
<version>3.0.5</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.truth</groupId>
|
|
<artifactId>truth</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.truth.extensions</groupId>
|
|
<artifactId>truth-java8-extension</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<!--
|
|
| Add standard LICENSE and NOTICE files
|
|
-->
|
|
<plugin>
|
|
<artifactId>maven-remote-resources-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<!--
|
|
| Temporarily excluded tests
|
|
-->
|
|
<excludes>
|
|
<exclude>**/*$*</exclude>
|
|
<exclude>**/OSGiContainerTest*</exclude>
|
|
<exclude>**/ScopesTest*</exclude>
|
|
<exclude>**/TypeConversionTest*</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>anonymous-class-loading</id>
|
|
<phase>test</phase>
|
|
<goals><goal>test</goal></goals>
|
|
<configuration>
|
|
<!-- enable ShowHiddenFrames to help tests find AOP frames on Java17 -->
|
|
<argLine>-Dguice_custom_class_loading=ANONYMOUS -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames</argLine>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>child-class-loading</id>
|
|
<phase>test</phase>
|
|
<goals><goal>test</goal></goals>
|
|
<configuration>
|
|
<argLine>-Dguice_custom_class_loading=CHILD</argLine>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>without-bytecode-generation</id>
|
|
<phase>test</phase>
|
|
<goals><goal>test</goal></goals>
|
|
<configuration>
|
|
<argLine>-Dguice_bytecode_gen_option=DISABLED</argLine>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>with-windows-line-separators</id>
|
|
<phase>test</phase>
|
|
<goals><goal>test</goal></goals>
|
|
<configuration>
|
|
<!-- enable ShowHiddenFrames to help tests find AOP frames on Java17 -->
|
|
<argLine>-Dline.separator='\r\n' -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames</argLine>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!--
|
|
| Add OSGi manifest
|
|
-->
|
|
<plugin>
|
|
<groupId>org.apache.felix</groupId>
|
|
<artifactId>maven-bundle-plugin</artifactId>
|
|
<configuration>
|
|
<instructions>
|
|
<Bundle-Name>${project.artifactId}</Bundle-Name>
|
|
<Import-Package>!org.objectweb.asm.*,!com.google.inject.*,!javax.annotation,*</Import-Package>
|
|
<Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
|
|
</instructions>
|
|
</configuration>
|
|
</plugin>
|
|
<!--
|
|
| Remove duplicate jarjar'd LICENSE and NOTICE
|
|
-->
|
|
<plugin>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>LICENSE</exclude>
|
|
<exclude>NOTICE</exclude>
|
|
</excludes>
|
|
<archive>
|
|
<manifestEntries>
|
|
<Automatic-Module-Name>com.google.guice</Automatic-Module-Name>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
<!--
|
|
| Generate sources jar
|
|
-->
|
|
<plugin>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
</plugin>
|
|
<!--
|
|
| Generate javadoc jar
|
|
-->
|
|
<plugin>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<!--
|
|
| JarJar build profile: Embed ASM classes under a Guice namespace
|
|
-->
|
|
<id>guice.with.jarjar</id>
|
|
<activation>
|
|
<property>
|
|
<name>guice.with.jarjar</name>
|
|
<value>!false</value>
|
|
</property>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.sonatype.plugins</groupId>
|
|
<artifactId>jarjar-maven-plugin</artifactId>
|
|
<version>1.9</version>
|
|
<executions>
|
|
<execution>
|
|
<id>jarjar</id>
|
|
<goals><goal>jarjar</goal></goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<overwrite>true</overwrite>
|
|
<includes>
|
|
<include>*:asm*</include>
|
|
</includes>
|
|
<rules>
|
|
<rule>
|
|
<pattern>org.objectweb.asm.*</pattern>
|
|
<result>com.google.inject.internal.asm.$@1</result>
|
|
</rule>
|
|
<rule>
|
|
<pattern>org.objectweb.asm.**.*</pattern>
|
|
<result>com.google.inject.internal.asm.@1.$@2</result>
|
|
</rule>
|
|
<keep>
|
|
<pattern>com.google.inject.**</pattern>
|
|
</keep>
|
|
<keep>
|
|
<pattern>com.googlecode.**</pattern>
|
|
</keep>
|
|
</rules>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<!--
|
|
| Attach the original non-JarJar'd classes so extensions can compile against them
|
|
-->
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>1.8</version>
|
|
<executions>
|
|
<execution>
|
|
<id>classes</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>attach-artifact</goal>
|
|
</goals>
|
|
<configuration>
|
|
<artifacts>
|
|
<artifact>
|
|
<file>${project.build.directory}/original-${project.build.finalName}.jar</file>
|
|
<classifier>classes</classifier>
|
|
</artifact>
|
|
</artifacts>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<!--
|
|
| m2e profile - enable use of JarJar inside Eclipse
|
|
-->
|
|
<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>1.0.0</version>
|
|
<configuration>
|
|
<lifecycleMappingMetadata>
|
|
<pluginExecutions>
|
|
<pluginExecution>
|
|
<pluginExecutionFilter>
|
|
<groupId>org.sonatype.plugins</groupId>
|
|
<artifactId>jarjar-maven-plugin</artifactId>
|
|
<versionRange>[1.4,)</versionRange>
|
|
<goals><goal>jarjar</goal></goals>
|
|
</pluginExecutionFilter>
|
|
<action><execute /></action>
|
|
</pluginExecution>
|
|
</pluginExecutions>
|
|
</lifecycleMappingMetadata>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|