views:

207

answers:

3

Hi,

I'm using Hudson to build Maven-projects with the dedicated Maven 2 job. unfortunately, I can't find any way to publish the generated javadoc like it can be done using a "Free Style" job and the "Publish javadoc" option. Running the javadoc goal didn't link the generated javadocs.

Any ideas?

A: 

What we do:

  • Use -DperformRelease in the Maven options to generate the ...-javadoc.jar
  • Create and deploy a Maven site which includes the javadoc.
lexicore
I'm using Hudson to build non-Maven projects too and would like the javadoc to be linked on the job page.
mort
+1  A: 

Well, the best I could do was switching to a "Free Style" job...the Maven job isn't doing that much for me anyways.

mort
+1  A: 

The answer is, that in your POM you need to define javadoc as a report like this:

</build>
<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
        </plugin>
    </plugins>
</reporting>

There is no need to switch to freestyle project. After it, hudson will publish it as a link in project view. My Hudson version is 1.376.

Gábor Lipták