stechio opened a new issue, #1293:
URL: https://github.com/apache/maven-javadoc-plugin/issues/1293

   ### New feature, improvement proposal
   
   ### Current Behavior
   
   The detection algorithm behind the [`detectLinks` 
parameter](https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#detectLinks),
 used to resolve cross-reference Javadoc links for project dependencies, is 
based on the **default Maven convention** `${project.url}/apidocs`.
   
   ### Problem
   
   In reality, *the overwhelming majority of published artifacts do NOT follow 
such convention*; rather, they typically rely on custom locations or, more 
commonly, on hosting services like <https://javadoc.io/>.
   
   As a consequence, *most cross-reference Javadoc links do NOT work out of the 
box*: they require tedious manual configuration via `dependencyLinks`.
   
   ### Proposed Behavior
   
   What's the point of carrying on with a broken algorithm that most of the 
times doesn't suit real needs? *Instead of forcing venerable dead conventions 
onto people, it would be much more useful if the detection algorithm dealt with 
the complexity of the real world*.
   
   My proposal is to let users define **base URLs where dependency links can be 
automatically resolved** — for example:
   
   ```xml
   <linkBases>
     <linkBase>https://javadoc.io/doc/</linkBase>
   </linkBases>
   ```
   
   The resolution will append GAV coordinates to the path:
   
   ```
   $linkBase/$groupId/$artifactId/$version
   ```
   
   For example:
   
   ```
   https://javadoc.io/doc/net.bytebuddy/byte-buddy/1.18.2/
   ```
   
   For each dependency, the algorithm will probe the default conventional 
location, then the specified `linkBases`, until a match is found; to speed 
things up, the algorithm could cache successful hits.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to