441406cc78
* Add a currently-failing test for Java records and `@Ignore` it. Also do the Maven gymastics required to ensure that this test only runs on Java versions ≥17. (It would also work on Java 16, but 17 is all we have in the CI.) Fix some compilation problems I saw when running locally, which for some reason don't show up in the CI. * Suppress some new lint options that trigger `-Werror`. We may fix these later. (Every test will need an explicit constructor!) * Select Java version with maven.compiler.release and maven.compiler.testRelease. Use `assumeNotNull` rather than an if-statement. * Specify <release>11</release> for javadoc. * Restore the @see for AccessibleObject.
223 lines
8.0 KiB
XML
223 lines
8.0 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>
|
|
|
|
<groupId>com.google.code.gson</groupId>
|
|
<artifactId>gson-parent</artifactId>
|
|
<version>2.9.2-SNAPSHOT</version>
|
|
<packaging>pom</packaging>
|
|
|
|
<name>Gson Parent</name>
|
|
<description>Gson JSON library</description>
|
|
<url>https://github.com/google/gson</url>
|
|
|
|
<modules>
|
|
<module>gson</module>
|
|
<module>extras</module>
|
|
<module>metrics</module>
|
|
<module>proto</module>
|
|
</modules>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<maven.compiler.release>7</maven.compiler.release>
|
|
<extraLintSuppressions></extraLintSuppressions>
|
|
</properties>
|
|
|
|
<scm>
|
|
<url>https://github.com/google/gson/</url>
|
|
<connection>scm:git:https://github.com/google/gson.git</connection>
|
|
<developerConnection>scm:git:git@github.com:google/gson.git</developerConnection>
|
|
<tag>HEAD</tag>
|
|
</scm>
|
|
|
|
<issueManagement>
|
|
<system>GitHub Issues</system>
|
|
<url>https://github.com/google/gson/issues</url>
|
|
</issueManagement>
|
|
|
|
<licenses>
|
|
<license>
|
|
<name>Apache-2.0</name>
|
|
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
|
</license>
|
|
</licenses>
|
|
|
|
<distributionManagement>
|
|
<repository>
|
|
<id>sonatype-nexus-staging</id>
|
|
<name>Nexus Release Repository</name>
|
|
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
|
</repository>
|
|
</distributionManagement>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.13.2</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.10.1</version>
|
|
<configuration>
|
|
<showWarnings>true</showWarnings>
|
|
<showDeprecation>true</showDeprecation>
|
|
<failOnWarning>true</failOnWarning>
|
|
<compilerArgs>
|
|
<!-- Enable all warnings, except for ones which cause issues when building with newer JDKs, see also
|
|
https://docs.oracle.com/en/java/javase/11/tools/javac.html -->
|
|
<compilerArg>-Xlint:all,-options${extraLintSuppressions}</compilerArg>
|
|
</compilerArgs>
|
|
<jdkToolchain>
|
|
<version>[11,)</version>
|
|
</jdkToolchain>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<version>3.4.1</version>
|
|
<configuration>
|
|
<jdkToolchain>
|
|
<version>[11,)</version>
|
|
</jdkToolchain>
|
|
<release>11</release>
|
|
<!-- Exclude `missing` group because some tags have been omitted when they are redundant -->
|
|
<doclint>all,-missing</doclint>
|
|
<!-- Link against newer Java API Javadoc because most users likely
|
|
use a newer Java version than the one used for building this project -->
|
|
<detectJavaApiLink>false</detectJavaApiLink>
|
|
<links>
|
|
<link>https://docs.oracle.com/en/java/javase/11/docs/api/</link>
|
|
</links>
|
|
<!-- Disable detection of offline links between Maven modules:
|
|
(1) Only `gson` module is published, so for other modules Javadoc links don't
|
|
matter much at the moment; (2) The derived URL for the modules is based on
|
|
the project URL (= Gson GitHub repo) which is incorrect because it is not
|
|
hosting the Javadoc (3) It might fail due to https://bugs.openjdk.java.net/browse/JDK-8212233 -->
|
|
<detectOfflineLinks>false</detectOfflineLinks>
|
|
<!-- Only show warnings and errors -->
|
|
<quiet>true</quiet>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-source-plugin</artifactId>
|
|
<version>3.2.1</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-gpg-plugin</artifactId>
|
|
<version>3.0.1</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-release-plugin</artifactId>
|
|
<version>3.0.0-M6</version>
|
|
<configuration>
|
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
|
<!-- Disable Maven Super POM release profile and instead use own one -->
|
|
<useReleaseProfile>false</useReleaseProfile>
|
|
<releaseProfiles>release</releaseProfiles>
|
|
</configuration>
|
|
</plugin>
|
|
<!-- Plugin for checking source and binary compatibility; used by GitHub workflow -->
|
|
<plugin>
|
|
<groupId>com.github.siom79.japicmp</groupId>
|
|
<artifactId>japicmp-maven-plugin</artifactId>
|
|
<version>0.16.0</version>
|
|
<configuration>
|
|
<oldVersion>
|
|
<dependency>
|
|
<groupId>${project.groupId}</groupId>
|
|
<artifactId>${project.artifactId}</artifactId>
|
|
<!-- This is set by the GitHub workflow -->
|
|
<version>JAPICMP-OLD</version>
|
|
</dependency>
|
|
</oldVersion>
|
|
<newVersion>
|
|
<file>
|
|
<path>${project.build.directory}/${project.build.finalName}.${project.packaging}</path>
|
|
</file>
|
|
</newVersion>
|
|
<parameter>
|
|
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
|
|
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
|
|
<excludes>
|
|
<exclude>com.google.gson.internal</exclude>
|
|
</excludes>
|
|
<onlyModified>true</onlyModified>
|
|
<skipXmlReport>true</skipXmlReport>
|
|
<reportOnlyFilename>true</reportOnlyFilename>
|
|
</parameter>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
</build>
|
|
|
|
<profiles>
|
|
<!-- Profile defining additional plugins to be executed for release -->
|
|
<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-no-fork</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<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>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>sign</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|