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

michaelo pushed a commit to branch MJAVADOC-795
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git

commit afb8601f52ae36b50e2c3a6bebcb6933886229c1
Author: Michael Osipov <micha...@apache.org>
AuthorDate: Sun May 26 20:50:40 2024 +0200

    [MJAVADOC-795] Upgrade to Parent 42 and Maven 3.6.3
    
    This closes #281
---
 pom.xml                                            | 66 +++++++++-------------
 .../maven/plugins/javadoc/FixJavadocMojoTest.java  | 15 +----
 .../maven/plugins/javadoc/JavadocReportTest.java   |  4 +-
 src/test/resources/unit/settings.xml               | 30 ----------
 4 files changed, 32 insertions(+), 83 deletions(-)

diff --git a/pom.xml b/pom.xml
index fdacfb60..ca739de9 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>41</version>
+    <version>42</version>
     <relativePath />
   </parent>
 
@@ -111,11 +111,11 @@ under the License.
 
   <properties>
     <javaVersion>8</javaVersion>
-    <mavenVersion>3.2.5</mavenVersion>
+    <mavenVersion>3.6.3</mavenVersion>
     <doxiaVersion>1.11.1</doxiaVersion>
     <doxia-sitetoolsVersion>1.11.1</doxia-sitetoolsVersion>
-    <wagonVersion>2.4</wagonVersion>
-    <aetherVersion>1.0.0.v20140518</aetherVersion>
+    <wagonVersion>3.5.3</wagonVersion>
+    <resolverVersion>1.4.1</resolverVersion>
     <!-- 
https://cwiki.apache.org/confluence/x/VIHOCg#MavenEcosystemCleanup-ResolverandMaven
 -->
     <plexus-java.version>1.2.0</plexus-java.version>
     <jetty.version>9.4.53.v20231009</jetty.version>
@@ -132,36 +132,6 @@ under the License.
     <slf4jVersion>1.7.36</slf4jVersion>
   </properties>
 
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.eclipse.aether</groupId>
-        <artifactId>aether-api</artifactId>
-        <version>${aetherVersion}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.aether</groupId>
-        <artifactId>aether-connector-basic</artifactId>
-        <version>${aetherVersion}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.aether</groupId>
-        <artifactId>aether-transport-wagon</artifactId>
-        <version>${aetherVersion}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.aether</groupId>
-        <artifactId>aether-impl</artifactId>
-        <version>${aetherVersion}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.aether</groupId>
-        <artifactId>aether-util</artifactId>
-        <version>${aetherVersion}</version>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
   <dependencies>
     <dependency>
       <!-- @TODO remove!! -->
@@ -206,6 +176,23 @@ under the License.
       <artifactId>maven-plugin-annotations</artifactId>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.resolver</groupId>
+      <artifactId>maven-resolver-api</artifactId>
+      <version>${resolverVersion}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.resolver</groupId>
+      <artifactId>maven-resolver-impl</artifactId>
+      <version>${resolverVersion}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.resolver</groupId>
+      <artifactId>maven-resolver-util</artifactId>
+      <version>${resolverVersion}</version>
+    </dependency>
     <dependency>
       <groupId>javax.inject</groupId>
       <artifactId>javax.inject</artifactId>
@@ -386,13 +373,15 @@ under the License.
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.eclipse.aether</groupId>
-      <artifactId>aether-connector-basic</artifactId>
+      <groupId>org.apache.maven.resolver</groupId>
+      <artifactId>maven-resolver-connector-basic</artifactId>
+      <version>${resolverVersion}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.eclipse.aether</groupId>
-      <artifactId>aether-transport-wagon</artifactId>
+      <groupId>org.apache.maven.resolver</groupId>
+      <artifactId>maven-resolver-transport-wagon</artifactId>
+      <version>${resolverVersion}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -486,7 +475,6 @@ under the License.
         <configuration>
           <systemPropertyVariables>
             <maven.home>${maven.home}</maven.home>
-            <https.protocols>${https.protocols}</https.protocols>
           </systemPropertyVariables>
           <environmentVariables>
             <JENKINS_MAVEN_AGENT_DISABLED>true</JENKINS_MAVEN_AGENT_DISABLED>
diff --git 
a/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java 
b/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java
index 1488d630..fa4a49da 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/FixJavadocMojoTest.java
@@ -503,13 +503,10 @@ public class FixJavadocMojoTest extends 
AbstractMojoTestCase {
                 .setLocalRepositoryManager(new 
SimpleLocalRepositoryManagerFactory()
                         .newInstance(
                                 session.getRepositorySession(), new 
LocalRepository(new File("target/local-repo"))));
-        // Ensure remote repo connection uses SSL
-        File globalSettingsFile = new File(getBasedir(), 
"target/test-classes/unit/settings.xml");
-        session.getRequest().setGlobalSettingsFile(globalSettingsFile);
         setVariableValueToObject(mojo, "session", session);
 
         // compile the test project
-        invokeCompileGoal(testPom, globalSettingsFile, mojo.getLog());
+        invokeCompileGoal(testPom, mojo.getLog());
         assertTrue(new File(testPomBasedir, "target/classes").exists());
 
         mojo.execute();
@@ -532,7 +529,7 @@ public class FixJavadocMojoTest extends 
AbstractMojoTestCase {
      * @param log not null
      * @throws MavenInvocationException if any
      */
-    private void invokeCompileGoal(File testPom, File globalSettingsFile, Log 
log) throws Exception {
+    private void invokeCompileGoal(File testPom, Log log) throws Exception {
         List<String> goals = new ArrayList<>();
         goals.add("clean");
         goals.add("compile");
@@ -543,13 +540,7 @@ public class FixJavadocMojoTest extends 
AbstractMojoTestCase {
         Properties properties = new Properties();
 
         JavadocUtil.invokeMaven(
-                log,
-                new File(getBasedir(), "target/local-repo"),
-                testPom,
-                goals,
-                properties,
-                invokerLogFile,
-                globalSettingsFile);
+                log, new File(getBasedir(), "target/local-repo"), testPom, 
goals, properties, invokerLogFile, null);
     }
 
     // ----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java 
b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index 74bb96b1..f80cdf64 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -45,6 +45,7 @@ import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
 import org.apache.maven.plugins.javadoc.ProxyServer.AuthAsyncProxyServlet;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.project.ProjectBuildingRequest.RepositoryMerging;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Settings;
 import org.apache.maven.shared.utils.io.FileUtils;
@@ -905,6 +906,7 @@ public class JavadocReportTest extends AbstractMojoTestCase 
{
         MavenSession session = spy(newMavenSession(mojo.project));
         ProjectBuildingRequest buildingRequest = 
mock(ProjectBuildingRequest.class);
         
when(buildingRequest.getRemoteRepositories()).thenReturn(mojo.project.getRemoteArtifactRepositories());
+        
when(buildingRequest.getRepositoryMerging()).thenReturn(RepositoryMerging.POM_DOMINANT);
         when(session.getProjectBuildingRequest()).thenReturn(buildingRequest);
         DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
         repositorySession.setLocalRepositoryManager(new 
SimpleLocalRepositoryManagerFactory()
@@ -1097,8 +1099,6 @@ public class JavadocReportTest extends 
AbstractMojoTestCase {
         repoSysSession.setLocalRepositoryManager(new 
SimpleLocalRepositoryManagerFactory()
                 .newInstance(session.getRepositorySession(), new 
LocalRepository(new File("target/local-repo"))));
         // Ensure remote repo connection uses SSL
-        File globalSettingsFile = new File(getBasedir(), 
"target/test-classes/unit/settings.xml");
-        session.getRequest().setGlobalSettingsFile(globalSettingsFile);
         LegacySupport legacySupport = lookup(LegacySupport.class);
         legacySupport.setSession(session);
         setVariableValueToObject(mojo, "session", session);
diff --git a/src/test/resources/unit/settings.xml 
b/src/test/resources/unit/settings.xml
deleted file mode 100644
index bfadfb4d..00000000
--- a/src/test/resources/unit/settings.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
http://maven.apache.org/xsd/settings-1.0.0.xsd";>
-  <mirrors>
-    <mirror>
-      <id>httpsCentral</id>
-      <url>https://repo.maven.apache.org/maven2</url>
-      <mirrorOf>central</mirrorOf>
-    </mirror>
-  </mirrors>
-</settings>

Reply via email to