Skip to content

Maven coordinates for shaded javac seem incorrect #169

Closed
@ZacSweers

Description

In looking at the 1.3 release pom, it seems like the javac configuration is incorrect.

From: https://search.maven.org/remotecontent?filepath=com/google/googlejavaformat/google-java-format-parent/1.3/google-java-format-parent-1.3.pom

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<guava.version>19.0</guava.version>
<javac.version>9-dev-r3297-1-shaded</javac.version>
</properties>
<dependencyManagement>
<dependencies>
<!--  Required runtime dependencies  -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>javac</artifactId>
<version>${javac.version}</version>
</dependency>

The maven coordinates for the shaded javac are still the same as the normal javac, which means it will compete with any existing javac jars on the path even though the sources used by GJF are shaded, so if the normal javac jar is on the path and wins, GJF will fail to find the classes because they won't be shaded. It seems to me that the artifactId should also be different.

This is to say: If someone has another version of the error-prone javac jar on the path, it could be used instead of this shaded one, and subsequently break GJF since it depends on shaded package names that would no longer be present.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions