Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose our own versions of plugins instead of inheriting from [deprecated](https://github.com/sonatype/oss-parents) oss-parent. #1043

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 55 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
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>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<groupId>com.google.truth</groupId>
<artifactId>truth-parent</artifactId>
<version>HEAD-SNAPSHOT</version>
Expand All @@ -18,10 +13,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Properties for plugins for which pluginManagement hasn't been working for us. -->
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
<maven-enforcer-plugin.version>3.1.0</maven-enforcer-plugin.version>

<!-- Properties for multiple-artifact deps. -->
<auto-value.version>1.10</auto-value.version>
<!--
Expand Down Expand Up @@ -217,6 +208,18 @@
<connection>scm:git:[email protected]:google/truth.git</connection>
<url>scm:git:[email protected]:google/truth.git</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<pluginManagement>
<plugins>
Expand All @@ -233,7 +236,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<version>3.4.1</version>
<configuration>
<additionalOptions>
<additionalOption>--frames</additionalOption>
Expand Down Expand Up @@ -300,13 +303,17 @@
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<version>3.1.0</version>
<executions>
<execution>
<id>enforce</id>
Expand Down Expand Up @@ -343,26 +350,42 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!--
Force a version >2.7 for this parent project. If we use the current
default of 2.7, Maven ignores this parent project's configuration when
running maven-javadoc-plugin in children during releases.
-->
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
</plugin>
<!--
Similar. Without this, Maven tries to run maven-enforcer-plugin 1.0,
and it fails to construct an instance of the rule class, apparently
because of a mismatch between the new Maven APIs and the old Enforcer
APIs.
-->
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sonatype-oss-release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals><goal>sign</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals><goal>jar</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-docs</id>
<goals><goal>jar</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>