Skip to content

Commit 110293f

Browse files
[MCOMPILER-583] Require Maven 3.6.3
1 parent 90131df commit 110293f

File tree

2 files changed

+30
-34
lines changed

2 files changed

+30
-34
lines changed

pom.xml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ under the License.
6767
</distributionManagement>
6868

6969
<properties>
70-
<mavenVersion>3.2.5</mavenVersion>
70+
<mavenVersion>3.6.3</mavenVersion>
7171
<plexusCompilerVersion>2.15.0</plexusCompilerVersion>
7272

7373
<groovyVersion>2.4.21</groovyVersion>
@@ -127,6 +127,10 @@ under the License.
127127
<groupId>org.apache.maven.shared</groupId>
128128
<artifactId>maven-shared-utils</artifactId>
129129
</exclusion>
130+
<exclusion>
131+
<groupId>org.codehaus.plexus</groupId>
132+
<artifactId>plexus-component-annotations</artifactId>
133+
</exclusion>
130134
</exclusions>
131135
</dependency>
132136

@@ -160,14 +164,7 @@ under the License.
160164
<dependency>
161165
<groupId>org.apache.maven.plugin-testing</groupId>
162166
<artifactId>maven-plugin-testing-harness</artifactId>
163-
<version>3.3.0</version>
164-
<scope>test</scope>
165-
</dependency>
166-
<dependency>
167-
<!-- still needed because of AbstractMojoTestCase -->
168-
<groupId>org.apache.maven</groupId>
169-
<artifactId>maven-compat</artifactId>
170-
<version>${mavenVersion}</version>
167+
<version>4.0.0-alpha-2</version>
171168
<scope>test</scope>
172169
</dependency>
173170
<dependency>
@@ -218,6 +215,29 @@ under the License.
218215
</java>
219216
</configuration>
220217
</plugin>
218+
<plugin>
219+
<groupId>org.apache.maven.plugins</groupId>
220+
<artifactId>maven-plugin-report-plugin</artifactId>
221+
<configuration>
222+
<requirementsHistories>
223+
<requirementsHistory>
224+
<version>from 3.13.0</version>
225+
<maven>3.6.3</maven>
226+
<jdk>8</jdk>
227+
</requirementsHistory>
228+
<requirementsHistory>
229+
<version>from 3.9.0 to 3.12.1</version>
230+
<maven>3.2.5</maven>
231+
<jdk>8</jdk>
232+
</requirementsHistory>
233+
<requirementsHistory>
234+
<version>from 3.0 to 3.8.1</version>
235+
<maven>3.0</maven>
236+
<jdk>7</jdk>
237+
</requirementsHistory>
238+
</requirementsHistories>
239+
</configuration>
240+
</plugin>
221241
</plugins>
222242
</pluginManagement>
223243

src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import java.io.File;
2222
import java.io.IOException;
2323
import java.io.InputStream;
24-
import java.lang.reflect.InvocationTargetException;
25-
import java.lang.reflect.Method;
2624
import java.nio.charset.Charset;
2725
import java.nio.file.Files;
2826
import java.nio.file.Path;
@@ -1503,9 +1501,7 @@ protected final Toolchain getToolchain() {
15031501
Toolchain tc = null;
15041502

15051503
if (jdkToolchain != null) {
1506-
// require Maven 3.3.1, that has plugin execution scoped Toolchain support: MNG-5755
1507-
List<Toolchain> tcs = getToolchains();
1508-
1504+
List<Toolchain> tcs = toolchainManager.getToolchains(session, "jdk", jdkToolchain);
15091505
if (tcs != null && !tcs.isEmpty()) {
15101506
tc = tcs.get(0);
15111507
}
@@ -1518,26 +1514,6 @@ protected final Toolchain getToolchain() {
15181514
return tc;
15191515
}
15201516

1521-
// TODO use direct method invocation when prerequisite upgraded to Maven 3.3.1
1522-
private List<Toolchain> getToolchains() {
1523-
try {
1524-
Method getToolchainsMethod =
1525-
toolchainManager.getClass().getMethod("getToolchains", MavenSession.class, String.class, Map.class);
1526-
1527-
@SuppressWarnings("unchecked")
1528-
List<Toolchain> tcs =
1529-
(List<Toolchain>) getToolchainsMethod.invoke(toolchainManager, session, "jdk", jdkToolchain);
1530-
return tcs;
1531-
} catch (NoSuchMethodException
1532-
| SecurityException
1533-
| IllegalAccessException
1534-
| IllegalArgumentException
1535-
| InvocationTargetException e) {
1536-
// ignore
1537-
}
1538-
return null;
1539-
}
1540-
15411517
private boolean isDigits(String string) {
15421518
for (int i = 0; i < string.length(); i++) {
15431519
if (!Character.isDigit(string.charAt(i))) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy