From 892934ce870a85fa0ac1447d09f051d9caaeec79 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 7 Jul 2023 07:31:21 -0400 Subject: [PATCH 1/3] plexus --> maven-shared-utils --- .../maven/plugins/javadoc/AbstractJavadocMojo.java | 6 +++--- .../org/apache/maven/plugins/javadoc/JavadocUtil.java | 10 +++++----- .../org/apache/maven/plugins/javadoc/StaleHelper.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java index 8374125cb..f44adf98c 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java @@ -103,6 +103,9 @@ import org.apache.maven.shared.artifact.filter.resolve.PatternInclusionsFilter; import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter; import org.apache.maven.shared.invoker.MavenInvocationException; +import org.apache.maven.shared.utils.cli.CommandLineException; +import org.apache.maven.shared.utils.cli.CommandLineUtils; +import org.apache.maven.shared.utils.cli.Commandline; import org.apache.maven.toolchain.Toolchain; import org.apache.maven.toolchain.ToolchainManager; import org.apache.maven.wagon.PathUtils; @@ -124,9 +127,6 @@ import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.WriterFactory; -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.util.cli.CommandLineUtils; -import org.codehaus.plexus.util.cli.Commandline; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.eclipse.aether.RepositorySystem; import org.eclipse.aether.RepositorySystemSession; diff --git a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java index 91942bb31..6ea145b74 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java @@ -93,14 +93,14 @@ import org.apache.maven.shared.invoker.Invoker; import org.apache.maven.shared.invoker.MavenInvocationException; import org.apache.maven.shared.invoker.PrintStreamHandler; +import org.apache.maven.shared.utils.cli.CommandLineException; +import org.apache.maven.shared.utils.cli.CommandLineUtils; +import org.apache.maven.shared.utils.cli.Commandline; +import org.apache.maven.shared.utils.io.DirectoryScanner; +import org.apache.maven.shared.utils.io.FileUtils; import org.apache.maven.wagon.proxy.ProxyInfo; import org.apache.maven.wagon.proxy.ProxyUtils; import org.codehaus.plexus.languages.java.version.JavaVersion; -import org.codehaus.plexus.util.DirectoryScanner; -import org.codehaus.plexus.util.FileUtils; -import org.codehaus.plexus.util.cli.CommandLineException; -import org.codehaus.plexus.util.cli.CommandLineUtils; -import org.codehaus.plexus.util.cli.Commandline; /** * Set of utilities methods for Javadoc. diff --git a/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java b/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java index 86cc52acf..c303565c3 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java @@ -31,9 +31,9 @@ import java.util.List; import org.apache.maven.reporting.MavenReportException; +import org.apache.maven.shared.utils.cli.Commandline; import org.codehaus.plexus.languages.java.version.JavaVersion; import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.cli.Commandline; /** * Helper class to compute and write data used to detect a From bda2bb6349ec41a092a78efeec142cde8785318e Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 7 Jul 2023 08:03:32 -0400 Subject: [PATCH 2/3] isolate CLI changes --- .../java/org/apache/maven/plugins/javadoc/JavadocUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java index 6ea145b74..6a140b4ad 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java @@ -96,11 +96,11 @@ import org.apache.maven.shared.utils.cli.CommandLineException; import org.apache.maven.shared.utils.cli.CommandLineUtils; import org.apache.maven.shared.utils.cli.Commandline; -import org.apache.maven.shared.utils.io.DirectoryScanner; -import org.apache.maven.shared.utils.io.FileUtils; import org.apache.maven.wagon.proxy.ProxyInfo; import org.apache.maven.wagon.proxy.ProxyUtils; import org.codehaus.plexus.languages.java.version.JavaVersion; +import org.codehaus.plexus.util.DirectoryScanner; +import org.codehaus.plexus.util.FileUtils; /** * Set of utilities methods for Javadoc. From e41477c1bed0e9b6634e0a03523c7c71bec73ec8 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 24 Sep 2023 12:43:14 -0400 Subject: [PATCH 3/3] make test more robust --- .../org/apache/maven/plugins/javadoc/JavadocReportTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 6df45691d..982bf53b9 100644 --- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java +++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java @@ -916,9 +916,9 @@ public void testProxy() throws Exception { String readed = readFile(commandLine); assertThat(readed).contains("-J-Dhttp.proxyHost=127.0.0.1").contains("-J-Dhttp.proxyPort=80"); if (SystemUtils.IS_OS_WINDOWS) { - assertThat(readed).contains(" -J-Dhttp.nonProxyHosts=\"www.google.com^|*.somewhere.com\" "); + assertThat(readed).contains(" -J-Dhttp.nonProxyHosts=\"www.google.com^|*.somewhere.com\""); } else { - assertThat(readed).contains(" \"-J-Dhttp.nonProxyHosts=\\\"www.google.com^|*.somewhere.com\\\"\" "); + assertThat(readed).contains(" \"-J-Dhttp.nonProxyHosts=\\\"www.google.com^|*.somewhere.com\\\"\""); } Path options = new File(getBasedir(), "target/test/unit/proxy-test/target/site/apidocs/options").toPath();