On 31 August 2017 at 17:57, Carnë Draug <carandraug+...@gmail.com> wrote: > On 31 August 2017 at 17:25, Emmanuel Bourg <ebo...@apache.org> wrote: >> Le 31/08/2017 à 18:03, Carnë Draug a écrit : >> >>> How do I set the path for the javadocs of other java libraries when >>> using maven-debian-helper? >> >> Good question, I'm not even sure this is supported, which is interesting >> because the *-java-doc package resolution occurring at the end of the >> build takes a lot of time for basically no benefit since the >> documentation isn't linked :D > > When building upstream directly with maven, this works fine: > > mvn -Dlinks=/usr/share/doc/default-jdk-doc/api package > > However, setting links on maven.properties file has no effect. Do you > have any idea why? >
I found out that the reason why -Dlinks is ignored is that maven's javadoc plugin will ignore the links option in offline mode. It's own documentation states "only used if isOffline is set to false" [1]. It seems that the right option is to set offlineLinks [2]. In the pom.xml file, this would be: <offlineLinks> <offlineLink> <url>file:///usr/share/doc/default-jdk-doc/api/</url> <location>file:///usr/share/doc/default-jdk-doc/api/</location> </offlineLink> </offlineLinks> but I don't know how I would set this on a properties file. All the documentation says is that the user property is named offlineLinks. Could anyone with actual maven experience give me a hand? Carnë [1] https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#links [2] https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#offlineLinks