You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2023/10/23 09:31:08 UTC

[maven-compiler-plugin] branch master updated: [MCOMPILER-551] Upgrade Parent to 40

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new abae4c3  [MCOMPILER-551] Upgrade Parent to 40
abae4c3 is described below

commit abae4c35cfea0b79d43dad7c704c48502d7322fe
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Mon Oct 23 00:45:18 2023 +0200

    [MCOMPILER-551] Upgrade Parent to 40
---
 pom.xml                                            | 42 ++++++++++++----------
 .../plugin/compiler/CompilerMojoTestCase.java      | 14 ++------
 2 files changed, 27 insertions(+), 29 deletions(-)

diff --git a/pom.xml b/pom.xml
index 927eed4..8276711 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-plugins</artifactId>
-    <version>39</version>
+    <version>40</version>
     <relativePath />
   </parent>
 
@@ -68,10 +68,6 @@ under the License.
 
   <properties>
     <mavenVersion>3.2.5</mavenVersion>
-    <!--
-      ! The following property is used in the integration tests MCOMPILER-157
-    -->
-    <mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
     <plexusCompilerVersion>2.13.0</plexusCompilerVersion>
 
     <groovyVersion>2.4.21</groovyVersion>
@@ -180,6 +176,13 @@ under the License.
       <version>${mavenVersion}</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <!-- used by maven-plugin-testing-harness -->
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-xml</artifactId>
+      <version>3.0.0</version>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
@@ -208,22 +211,27 @@ under the License.
   </repositories>
 
   <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>com.diffplug.spotless</groupId>
+          <artifactId>spotless-maven-plugin</artifactId>
+          <configuration>
+            <java>
+              <includes>
+                <include>src/**/*.java</include>
+              </includes>
+            </java>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
     <plugins>
       <plugin>
         <groupId>org.eclipse.sisu</groupId>
         <artifactId>sisu-maven-plugin</artifactId>
       </plugin>
-      <plugin>
-        <groupId>com.diffplug.spotless</groupId>
-        <artifactId>spotless-maven-plugin</artifactId>
-        <configuration>
-          <java>
-            <includes>
-              <include>src/**/*.java</include>
-            </includes>
-          </java>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 
@@ -236,8 +244,6 @@ under the License.
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-invoker-plugin</artifactId>
-              <!-- TODO: verify the version override is still needed when upgrading parent -->
-              <version>3.5.0</version>
               <executions>
                 <execution>
                   <id>integration-test</id>
diff --git a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
index a19ce74..db72307 100644
--- a/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
+++ b/src/test/java/org/apache/maven/plugin/compiler/CompilerMojoTestCase.java
@@ -382,17 +382,9 @@ public class CompilerMojoTestCase extends AbstractMojoTestCase {
         when(handler.isAddedToClasspath()).thenReturn(true);
         when(junitArtifact.getArtifactHandler()).thenReturn(handler);
 
-        File artifactFile;
-        String localRepository = System.getProperty("localRepository");
-        if (localRepository != null) {
-            artifactFile = new File(localRepository, "junit/junit/3.8.1/junit-3.8.1.jar");
-        } else {
-            // for IDE
-            String junitURI =
-                    org.junit.Test.class.getResource("Test.class").toURI().toString();
-            junitURI = junitURI.substring("jar:".length(), junitURI.indexOf('!'));
-            artifactFile = new File(URI.create(junitURI));
-        }
+        String junitURI = org.junit.Test.class.getResource("Test.class").toURI().toString();
+        junitURI = junitURI.substring("jar:".length(), junitURI.indexOf('!'));
+        File artifactFile = new File(URI.create(junitURI));
         when(junitArtifact.getFile()).thenReturn(artifactFile);
 
         testClasspathList.add(artifactFile.getAbsolutePath());