FroMage / jax-doclets

Set of JavaDoc doclets for modern Java annotations APIs
http://www.lunatech-labs.com/open-source/jax-doclets
GNU Lesser General Public License v3.0
26 stars 23 forks source link

Links path to "../<dirname>" appears to generate as just ".." #37

Closed MaggieLeber closed 12 years ago

MaggieLeber commented 12 years ago

I've been having trouble getting {@link} to work pointing to vanilla Javadoc of a POJO class rooted in a sibling directory to the JAX-RS docs when running from Maven.

My intent is to have ordinary Javadoc in target/site/apidocs and the JAX_RS in target/site/jaxrsdocs

But when I run

<reporting>
 <plugins>
  <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>2.8</version>
  <reportSets>
  <reportSet>
  <id>javadoc</id>
  <reports><report>javadoc</report></reports>
  </reportSet>
 <reportSet>
 <id>jaxrs</id>
  <configuration>
  <doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet>
  <docletArtifacts>
   <docletArtifact>
    <groupId>com.lunatech.jax-doclets</groupId>
    <artifactId>doclets</artifactId>
    <version>0.10.0</version>
   </docletArtifact>
  </docletArtifacts>
  <description>Jax-RS RESTful services</description>
  <destDir>jaxrsdocs</destDir>
  <links><link>../apidocs</link></links>
 </configuration>
    <reports><report>javadoc</report></reports>
   </reportSet>
  </reportSets>
  </plugin>
  </plugins>
  </reporting>

and I code something like

 * @return the named {@link com.scala.cm.domain.content.Content}

it generates

<a href="../com/scala/cm/domain/content/Content.html" 
 title="class in com.scala.cm.domain.content">
<code>Content</code>
</a>

I'd expect the href to be to "../apidocs/com/scala/cm/domain/content/Content.html" instead because of ../apidocs ...in fact there's something similar in the usage notes for linking to JAXB from JAX-RS.

I hope this is a usage error on my part.

FroMage commented 12 years ago

To be honest I've never tried it. The links we support are automatically generated, not user-entered like @link, though it seems #26 adds support for them. Better wait for #26 to come in and retest this.

FroMage commented 12 years ago

So apparently #26 adds support for @link for the JAX-RS doclet. I will add support for the other doclets as soon as it is merged (should be shortly). For info, @link support was first requested in #1.

MaggieLeber commented 12 years ago

Thanks for the quick update. I'll follow #26 with interest.