[MJAVADOC-607] followLinks fix to get redirect target breaks for certain sites
Signed-off-by: Doychin Bondzhev <doychin@dsoft-bg.com>
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 cb68f86..9250cd0 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -6345,6 +6345,11 @@
{
// only print in debug, it should have been logged already in warn/error because link isn't valid
getLog().debug( "Could not follow " + link + ". Reason: " + e.getMessage() );
+
+ // Even when link produces error it should be kept in the set because the error might be caused by
+ // incomplete redirect configuration on the server side.
+ // This partially restores the previous behaviour before fix for MJAVADOC-427
+ redirectLinks.add( link );
}
}
return redirectLinks;