@@ -543,7 +543,7 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
543
543
private boolean detectOfflineLinks ;
544
544
545
545
/**
546
- * Detect the Java API link for the current build, i.e . <code>https://docs.oracle.com/javase/1.4.2/docs/api/</code>
546
+ * Detect the Java API link for the current build, e.g . <code>https://docs.oracle.com/javase/1.4.2/docs/api/</code>
547
547
* for Java source 1.4.
548
548
* <br/>
549
549
* By default, the goal detects the Javadoc API link depending the value of the <code>source</code>
@@ -3767,7 +3767,7 @@ private Set<OfflineLink> getLinkofflines() throws MavenReportException {
3767
3767
* If {@code detectLinks}, try to add javadoc apidocs according Maven conventions for all dependencies given
3768
3768
* in the project.
3769
3769
* <br/>
3770
- * According the Javadoc documentation, all defined link should have <code>${link}/package-list</code> fetchable.
3770
+ * According the Javadoc documentation, all defined links should have <code>${link}/package-list</code> fetchable.
3771
3771
* <br/>
3772
3772
* <b>Note</b>: when a link is not fetchable:
3773
3773
* <ul>
@@ -3802,7 +3802,7 @@ private void addLinkArguments(List<String> arguments) throws MavenReportExceptio
3802
3802
}
3803
3803
3804
3804
/**
3805
- * Coppy all resources to the output directory
3805
+ * Copy all resources to the output directory.
3806
3806
*
3807
3807
* @param javadocOutputDirectory not null
3808
3808
* @throws MavenReportException if any
@@ -5725,14 +5725,17 @@ private Set<String> followLinks(Set<String> links) {
5725
5725
try {
5726
5726
redirectLinks .add (JavadocUtil .getRedirectUrl (new URI (link ).toURL (), settings )
5727
5727
.toString ());
5728
- } catch (Exception e ) {
5728
+ } catch (IOException e ) {
5729
5729
// only print in debug, it should have been logged already in warn/error because link isn't valid
5730
5730
getLog ().debug ("Could not follow " + link + ". Reason: " + e .getMessage ());
5731
5731
5732
5732
// Even when link produces error it should be kept in the set because the error might be caused by
5733
5733
// incomplete redirect configuration on the server side.
5734
5734
// This partially restores the previous behaviour before fix for MJAVADOC-427
5735
5735
redirectLinks .add (link );
5736
+ } catch (URISyntaxException | IllegalArgumentException e ) {
5737
+ // only print in debug, it should have been logged already in warn/error because link isn't valid
5738
+ getLog ().debug ("Could not follow " + link + ". Reason: " + e .getMessage ());
5736
5739
}
5737
5740
}
5738
5741
return redirectLinks ;
0 commit comments