You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/04/08 12:41:37 UTC
[GitHub] [maven-javadoc-plugin] maxcellent commented on a change in pull request #34: [MJAVADOC-628] - add javadoc.io link pattern when option is …
maxcellent commented on a change in pull request #34: [MJAVADOC-628] - add javadoc.io link pattern when <detectLink> option is …
URL: https://github.com/apache/maven-javadoc-plugin/pull/34#discussion_r405493369
##########
File path: src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
##########
@@ -6543,6 +6557,38 @@ private static String getJavadocLink( MavenProject p )
return url + "/" + destDir;
}
+ /**
+ * @param groupId not null
+ * @param artifactId not null
+ * @param version not null
+ * @return the javadoc link based on the project javadoc.io url
+ * i.e. <code>https://www.javadoc.io/doc/${group_id}/${artifact_id}/${version_id}/package-list</code>
+ */
+ static String getJavadocIOLink( String groupId, String artifactId, String version )
+ {
+ String baseUrl = "https://javadoc.io/doc/";
+ return baseUrl + urlEncode( groupId ) + "/" + urlEncode( artifactId ) + "/" + urlEncode( version );
+ }
+
+ static String urlEncode( String s )
Review comment:
This has a default modifier so that unit test can test against it directly.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services