Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven "Skipping javadoc generation" WHY?

I'm working on a maven project and want to generate the most basic of javadocs.

This is the plugin I add to my pom.xml

<build>
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <executions>
            <execution>
                <id>attach-javadocs</id>
                <phase>package</phase>
                <goals>
                    <goal>jar</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
</plugins>
</build>

I then run the goal mvn clean package and after successfully cleaning and packaging my project it says

[INFO] --- maven-javadoc-plugin:2.8.1:jar (attach-javadocs) @ project-name ---
[INFO] Skipping javadoc generation.

I've tried adding the property:

<properties>
    <maven.javadoc.skip>false</maven.javadoc.skip>
</properties>

And have also tried this in cmd prompt:

mvn clean package -Dmaven.javadoc.skip=false

No different...

Anything I am blatantly missing?

like image 814
Daniel Avatar asked Mar 25 '13 02:03

Daniel


2 Answers

You must use

-Dmaven.javadoc.skip=true <-- to skip javadoc

-Dmaven.javadoc.skip=false <<-- do not skip

like image 59
Davit Tvildiani Avatar answered Oct 18 '22 20:10

Davit Tvildiani


see the effective pom of your project either on the command line by typing mvn help:effective-pom or through eclipse effective-pom view of your pom. That will give you the true configuration. If the flag is set to true, then:

  1. are you adding the configuration in an inactive profile? check mvn help:active-profiles
  2. do you have pom inheritance and inheriting the configuration from the parents? check parent poms

I don't think that changing the version will help you much as the "skip" parameter was available from version 2.5

like image 44
Tekdev Avatar answered Oct 18 '22 20:10

Tekdev