vaadin / vaadin.com

Public tracker for vaadin.com website
https://vaadin.com/
5 stars 0 forks source link

Can't link project's Javadoc to Vaadin's Javadoc. #100

Open archiecobbs opened 2 years ago

archiecobbs commented 2 years ago

I'm building a project using Java 8 and Maven. The project builds Javadoc API docs as usual. My Javadocs have lots of {@link} links to Vaadin classes. But it seems impossible to make the corresponding generated hyperlinks actually work.

The following doesn't work:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>${maven.javadoc.plugin.version}</version>
    <configuration>
        <links>
            <link>https://vaadin.com/api/platform/${vaadin.version}/</link>
        </links>
    </configuration>
</plugin>

This is the same problem as #63, which I think happens because Vaadin is built with newer JDK versions which generate element-list instead of package-list files.

OK, so there is a workaround, which is to manually create and add the package-list file to the project under src/javadoc/vaadin/, and then do this:

<!-- Fix Javadoc links -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>${maven.javadoc.plugin.version}</version>
    <configuration>
        <offlineLinks>
            <offlineLink>
                <url>https://vaadin.com/api/platform/${vaadin.version}</url>
                <location>${project.basedir}/src/javadoc/vaadin</location>
            </offlineLink>
        </offlineLinks>
    </configuration>
</plugin>

But that doesn't work either! Because the vaadin.com website doesn't allow opening API docs with a HTML frame for some reason:

Screen Shot 2022-01-15 at 4 58 15 PM

Can you fix that somehow?

Bleh! I just want working hyperlinks in my Javadoc.

This used to be so easy and now it seems so hard. What am I missing?

Thanks for any help.