Search code examples
javamavennetbeansjfreechartjavadoc

Setting linksource property in NetBeans Maven project


When working with an evolving API, I often use the -linksource option of javadoc to add source links to the standard HTML documentation. In the particular case of JFreeChart, I might

  • Add linksource="yes" to the "javadoc" target in build.xml, as shown here, or
  • Add -linksource to the NetBeans project properties as an additional javadoc property.

As the current version of JFreeChart uses Maven, I tried setting linksource to yes in the action that generates javadoc, as shown below.

yes.png

The resulting documentation had no source links. I haven't used Maven in a while. Where am I going awry?


Solution

  • You're almost there. As JB Nizet illustrates here, ant treats yes, on and true as the same value. In contrast, your Netbeans Maven project uses the javadoc:javadoc plugin, as can be seen under "Execute Goals" for the selected action. To meet the plugin's requirements, simply set the linksource attribute to true, as shown below.

    true.png