Skip to content

Commit c763cee

Browse files
committed
The cause: javac 10 and 11 are broken
In 10 and 11, the presence of a --release 9 (for either), or --release 10 (for 11), will cause getDeclaredType to think it is seeing java.sql types in *all of the modules that transitively require java.sql* ... and having seen more than one, rules it ambiguous and refuses to see it at all. In other words, this is something that breaks when 10 or 11 is given a --release from the past. 10 works fine building for 10, 11 works fine building for 11. 9 builds for itself just fine, and whatever the issue was in 10 and 11 got fixed in 12, so 12 and 13 can build for --release 9 with no trouble. This is hacky.
1 parent 2c0f2a6 commit c763cee

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

pom.xml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,35 @@
6767

6868
<profiles>
6969
<profile>
70-
<id>release9</id>
70+
<id>release10</id>
7171
<activation>
72-
<jdk>[9,)</jdk>
72+
<jdk>[10,11)</jdk>
7373
</activation>
7474
<build>
7575
<plugins>
7676
<plugin>
7777
<groupId>org.apache.maven.plugins</groupId>
7878
<artifactId>maven-compiler-plugin</artifactId>
79-
<version>3.8.1</version>
8079
<configuration>
81-
<release>9</release>
80+
<release>10</release>
81+
</configuration>
82+
</plugin>
83+
</plugins>
84+
</build>
85+
</profile>
86+
87+
<profile>
88+
<id>release11</id>
89+
<activation>
90+
<jdk>[11,12)</jdk>
91+
</activation>
92+
<build>
93+
<plugins>
94+
<plugin>
95+
<groupId>org.apache.maven.plugins</groupId>
96+
<artifactId>maven-compiler-plugin</artifactId>
97+
<configuration>
98+
<release>11</release>
8299
</configuration>
83100
</plugin>
84101
</plugins>
@@ -108,6 +125,11 @@
108125
<artifactId>maven-resources-plugin</artifactId>
109126
<version>3.0.1</version><!-- later versions are Java 7+ -->
110127
</plugin>
128+
<plugin>
129+
<groupId>org.apache.maven.plugins</groupId>
130+
<artifactId>maven-compiler-plugin</artifactId>
131+
<version>3.8.1</version>
132+
</plugin>
111133
</plugins>
112134
</pluginManagement>
113135
<plugins>
@@ -116,6 +138,7 @@
116138
<artifactId>maven-compiler-plugin</artifactId>
117139
<configuration>
118140
<encoding>${project.build.sourceEncoding}</encoding>
141+
<release>9</release>
119142
</configuration>
120143
</plugin>
121144
<plugin>

0 commit comments

Comments
 (0)