Skip to content

Commit

Permalink
[MJAVADOC-741] Upgrade plugins and components
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Feb 12, 2023
1 parent d02fd90 commit c56ec0a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 62 deletions.
32 changes: 11 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ under the License.
<wagonVersion>2.4</wagonVersion>
<aetherVersion>1.0.0.v20140518</aetherVersion>
<!-- https://cwiki.apache.org/confluence/x/VIHOCg#MavenEcosystemCleanup-ResolverandMaven -->
<plexus-java.version>1.1.0</plexus-java.version>
<jetty.version>9.4.43.v20210629</jetty.version>
<plexus-java.version>1.1.2</plexus-java.version>
<jetty.version>9.4.50.v20221201</jetty.version>
<!-- for ITs -->
<sitePluginVersion>3.12.1</sitePluginVersion>
<projectInfoReportsPluginVersion>3.2.2</projectInfoReportsPluginVersion>
<projectInfoReportsPluginVersion>3.4.2</projectInfoReportsPluginVersion>
<project.build.outputTimestamp>2022-08-10T19:51:10Z</project.build.outputTimestamp>
<slf4jVersion>1.7.36</slf4jVersion>
</properties>
Expand Down Expand Up @@ -219,12 +219,12 @@ under the License.
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-invoker</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-common-artifact-filters</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
</dependency>

<!-- Doxia -->
Expand Down Expand Up @@ -262,18 +262,18 @@ under the License.
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.15</version>
<version>4.4.16</version>
</dependency>

<dependency>
<groupId>com.thoughtworks.qdox</groupId>
<artifactId>qdox</artifactId>
<version>2.0.1</version>
<version>2.0.3</version>
</dependency>

<!-- Plexus -->
Expand All @@ -285,7 +285,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.4.2</version>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down Expand Up @@ -371,7 +371,7 @@ under the License.
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.23.1</version>
<version>3.24.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -407,11 +407,6 @@ under the License.
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand All @@ -420,11 +415,6 @@ under the License.
<failOnWarnings>false</failOnWarnings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -504,7 +494,7 @@ under the License.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>mrm-maven-plugin</artifactId>
<version>1.2.0</version>
<version>1.5.0</version>
<executions>
<execution>
<id>repository</id>
Expand Down
47 changes: 6 additions & 41 deletions src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1006,27 +1006,17 @@ private static InvocationResult invoke(

/**
* @param log a logger could be null
* @return the Maven home defined in the <code>maven.home</code> system property or defined in <code>M2_HOME</code>
* system env variables or null if never set.
* @return the Maven home defined in the <code>maven.home</code> system property
* or null if never set.
* @since 2.6
*/
private static String getMavenHome(Log log) {
String mavenHome = System.getProperty("maven.home");
if (mavenHome == null) {
try {
mavenHome = CommandLineUtils.getSystemEnvVars().getProperty("M2_HOME");
} catch (IOException e) {
if (log != null && log.isDebugEnabled()) {
log.debug("IOException: " + e.getMessage());
}
}
}

File m2Home = new File(mavenHome);
if (!m2Home.exists()) {
if (log != null && log.isErrorEnabled()) {
log.error("Cannot find Maven application directory. Either specify 'maven.home' system property, or "
+ "M2_HOME environment variable.");
log.error("Cannot find Maven application directory. Either specify 'maven.home' system property.");
}
}

Expand All @@ -1039,16 +1029,7 @@ private static String getMavenHome(Log log) {
* @since 2.6
*/
private static String getMavenOpts(Log log) {
String mavenOpts = null;
try {
mavenOpts = CommandLineUtils.getSystemEnvVars().getProperty("MAVEN_OPTS");
} catch (IOException e) {
if (log != null && log.isDebugEnabled()) {
log.debug("IOException: " + e.getMessage());
}
}

return mavenOpts;
return CommandLineUtils.getSystemEnvVars().getProperty("MAVEN_OPTS");
}

/**
Expand All @@ -1061,14 +1042,7 @@ private static String getMavenOpts(Log log) {
private static File getJavaHome(Log log) {
File javaHome = null;

String javaHomeValue = null;
try {
javaHomeValue = CommandLineUtils.getSystemEnvVars().getProperty("JAVA_HOME");
} catch (IOException e) {
if (log != null && log.isDebugEnabled()) {
log.debug("IOException: " + e.getMessage());
}
}
String javaHomeValue = CommandLineUtils.getSystemEnvVars().getProperty("JAVA_HOME");

// if maven.home is set, we can assume JAVA_HOME must be used for testing
if (System.getProperty("maven.home") == null || javaHomeValue == null) {
Expand Down Expand Up @@ -1100,16 +1074,7 @@ private static File getJavaHome(Log log) {
* @since 2.6
*/
private static String getJavaOpts(Log log) {
String javaOpts = null;
try {
javaOpts = CommandLineUtils.getSystemEnvVars().getProperty("JAVA_OPTS");
} catch (IOException e) {
if (log != null && log.isDebugEnabled()) {
log.debug("IOException: " + e.getMessage());
}
}

return javaOpts;
return CommandLineUtils.getSystemEnvVars().getProperty("JAVA_OPTS");
}

/**
Expand Down

0 comments on commit c56ec0a

Please sign in to comment.