Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish JavaDoc on Jenkins with maven

I have maven project that is built by Jenkins-CI. How to generate and publish JavaDoc on Jenkins?

like image 287
Paul Verest Avatar asked Dec 24 '12 02:12

Paul Verest


2 Answers

  1. Make sure Jenkins javadoc plugin is installed.
    Go to http://yourjenkinsserver.com/jenkins/pluginManager/installed to see list of intalled plugins.
    Plugin page https://wiki.jenkins-ci.org/display/JENKINS/Javadoc+Plugin
  2. Configure Jenkins job:
    In Build section, Goals and options line add:

    javadoc:javadoc

That's all. No need to change pom.xml

Jenkinsns job view

like image 71
Paul Verest Avatar answered Nov 09 '22 23:11

Paul Verest


The simplest thing to do is to create a separate task that runs thr javadoc command, and which runs after the compile task. You pass it the input and output directories.

I would run a separate tomcat for your CI website - it's easier.

like image 20
Bohemian Avatar answered Nov 10 '22 00:11

Bohemian