Skip to content
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
Fix issue for downstream users of Maven 3.10.0, and clean up obsolete…
… profile.

IIUC: For security reasons, Maven has changed to disallow _dependencies_ to select a profile based on what files exist on disk. So, in order to detect whether to include `tools.jar` on the classpath, we must check the Java version, rather than checking whether `tools.jar` exists.

This change, once released and pulled into Auto, should resolve the problem seen at head, including in such PRs as google/auto#2160.

I also figured that it was about time to remove the Mac profile that sounds like it may have supported Java *6* there.

RELNOTES=Fixed Java 8 build configuration to work for downstream users of Maven 3.10.0.
PiperOrigin-RevId: 996668159
  • Loading branch information
cpovirk authored and Compile-Testing Team committed Oct 9, 2026
commit 63b2b794f03bc6eb26c2f73ac7710c4aeace223f
24 changes: 1 addition & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@
<id>tools-jar</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
<jdk>1.8</jdk>
</activation>
<dependencies>
<dependency>
Expand All @@ -182,26 +180,6 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>classes-jar</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<exists>${java.home}/../Classes/classes.jar</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<!-- TODO(dpb): Do we really need this? Isn't classes.jar always on the classpath? -->
<!-- TODO(dpb): Is classes.jar obsolete on the Mac? -->
<systemPath>${java.home}/../Classes/classes.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>sonatype-oss-release</id>
<activation>
Expand Down
Loading