Thursday, March 08, 2007

Maven2: creating JavaDoc links behind a firewall

I just spent the better part of the morning trying to make javadoc links work. In short: configuring the proxy did not work - We have to cope with offline package-lists, not a big problem really. Of course, to configure the maven-javadoc-plugin to do this, reading the source was the quickest way to go. So put something like this in your pom.xml:

<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<linksource>true</linksource>
<offlineLinks>
<offlineLink>
<url>http://java.sun.com/j2se/1.5.0/docs/api/</url>
<location>T:/maven/apidoc-packagelists/jdk-1.5.0</location>
</offlineLink>
</offlineLinks>
<docfilessubdirs>true</docfilessubdirs>
<excludedocfilessubdir>CVS</excludedocfilessubdir>
</configuration>
</plugin>

The locations must be valid Java file paths, pointing to a locally accessible directory which contains the package-list file for the given url.

2 comments:

Andreas said...

Thanks, while reading the documentation for the mojo, I was wandering what the offlineLinks tag should be like. Now I know!

Anonymous said...

Now do you worried about that in the game do not had enough rohan crone to play the game, now you can not worried, my friend told me a website, in here you can buy a lot rohan gold and only spend a little money, do not hesitate, it was really, in here we had much rohan online crone, we can sure that you will get the rohan online gold, quick to come here to buy rohan money.

Now do you worried about that in the game do not had enough Rose zuly to play the game, now you can not worried, my friend told me a website, in here you can buy a lot rose zulie and only spend a little money, do not hesitate, it was really, in here we had much rose online zuly, we can sure that you will get the rose online zulie, quick to come here to buy Arua ROSE zuly.