Niclas
Niclas

Reputation: 1406

Include images in Maven-generated JavaDoc

I have a problem in making maven include my images when running javadoc:javadoc

Source structure looks like this

src/main/javadoc/
    classpackage/../path
        docfiles
            image.png
        package.html

When running javadoc:javadoc the package.html file is picked up, for the specific package, but the image.png is left out. Am I missing something?

Best regards, Niclas

Upvotes: 1

Views: 908

Answers (1)

Roberto Simoni
Roberto Simoni

Reputation: 11

Pay attention to the directory that need to be named doc-files and remember to configure correctly the maven-javadoc-plugin. Eg:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.8</version>
    <configuration>
        <docfilessubdirs>true</docfilessubdirs>
    </configuration>
</plugin>

Upvotes: 1

Related Questions