You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move configuration out of sonatype-oss-release to make it the default, except for maven-gpg-plugin.
This (I hope) accomplished two classes of goals:
- By enabling\[*\] `central-publishing-maven-plugin` by default, we enable it even for _snapshot_ deployment. Advantages:
- That causes us to begin deploying snapshots through the new Central system.
- That lets the plugin automatically disable `maven-deploy-plugin`. (Compare cl/805882118 for Truth.) And _that_ allows us to remove the explicit configuration of https://central.sonatype.com/repository/maven-snapshots, which is the default for `central-publishing-maven-plugin` but which has been required because `maven-deploy-plugin` demands _some_ value. (Compare cl/805842432 for Truth.)
- It ensures that non-release builds _also_ see the versions of plugins that we have requested. That addresses this warning, which google/guava#7961 had proposed to address another way but for which I'd merely added a TODO in cl/804600714:
```
[WARNING] Some problems were encountered while building the effective model for com.google.guava:guava-tests:jar:999.0.0-HEAD-jre-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.sonatype.central:central-publishing-maven-plugin is missing. @ line 103, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
```
\[*\] "Enabling" may or may not be the right word. The `central-publishing-maven-plugin` plugin still doesn't _run_ unless someone actually runs `mvn deploy`. The only difference in output that the change causes for a typical build is this:
```
[INFO] Inspecting build with total of 6 modules
[INFO] Installing Central Publishing features
```
I left `maven-gpg-plugin` alone because we don't want to request that users enter their signing keys during snapshot deployment, let alone during normal builds.
(I suspect that much of the configuration that I'm moving is itself restating the defaults. We carried much or all of it over from the old `oss-parent` in changes like cl/492304151. I may try to clean that up later. But I saw in Compile-Testing that some of these changes can have an effect: In that project, the changes enabled Javadoc as part of `install`. That led to errors under JDK 8, so I fixed those by making the `--add-exports` configuration conditional.)
Plus, I removed some redundant declarations of ` <groupId>org.apache.maven.plugins</groupId>`, which is the default for plugins. (We had been including it inconsistently.) Compare cl/793718324.
Also, in Guava, remove a "Guava Documentation Site" entry. This was added back in cl/29254221, but I can't immediately figure out why, and I see no other references to its `guava-site` in either the main or `gh-pages` branch of our repo, nor anywhere internal to Google. I'm hoping that it's at least become unnecessary in the past decade-plus. (The changes in this CL at least have no effect on the _jars_ that we produce as output.)
RELNOTES=n/a
PiperOrigin-RevId: 805841232
0 commit comments