Skip to content

Commit

Permalink
Fix automatic toolchain downloads again.
Browse files Browse the repository at this point in the history
Automatic toolchains downloads aren't necessary for our CI, which pre-downloads the toolchains that it needs. But automatic toolchains downloads remain necessary for local users who don't already have the necessary JDKs downloaded and registered.

I had the configuration right initially, and then I broke it in cl/711746683 without noticing because (as a comment in `pom.xml` observes) you don't notice unless you clear out your local Maven configuration before running. (I still haven't done that now, as of this writing, because I'm in the process of using one of the Maven-configured JDKs for something else....)

This fix also addresses this warning:

```
[WARNING] Some problems were encountered while building the effective model for com.google.guava:guava:bundle:HEAD-jre-SNAPSHOT
[WARNING] 'build.pluginManagement.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.mvnsearch:toolchains-maven-plugin @ com.google.guava:guava-parent:HEAD-jre-SNAPSHOT, /usr/local/google/home/cpovirk/clients/guava-black/guava/pom.xml, line 389, column 17
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.google.guava:guava-parent:pom:HEAD-jre-SNAPSHOT
[WARNING] 'build.pluginManagement.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.mvnsearch:toolchains-maven-plugin @ line 389, column 17
[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.
```

RELNOTES=n/a
PiperOrigin-RevId: 715914892
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jan 15, 2025
1 parent 30aee2e commit d6ceb21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
<plugin>
<groupId>org.mvnsearch</groupId>
<artifactId>toolchains-maven-plugin</artifactId>
<version>4.5.0</version>
<executions>
<!--
We can apparently have only one <jdk> per execution: Others are silently ignored :(
Expand Down Expand Up @@ -391,11 +392,6 @@
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.mvnsearch</groupId>
<artifactId>toolchains-maven-plugin</artifactId>
<version>4.5.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
6 changes: 1 addition & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
<plugin>
<groupId>org.mvnsearch</groupId>
<artifactId>toolchains-maven-plugin</artifactId>
<version>4.5.0</version>
<executions>
<!--
We can apparently have only one <jdk> per execution: Others are silently ignored :(
Expand Down Expand Up @@ -386,11 +387,6 @@
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.mvnsearch</groupId>
<artifactId>toolchains-maven-plugin</artifactId>
<version>4.5.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit d6ceb21

Please sign in to comment.