How can I disable the Maven Javadoc plugin from the command line?

IAdapter picture IAdapter · Sep 14, 2011 · Viewed 170k times · Source

In pom.xml I have declaration like this

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

is there any way to turn that off from command line?

I do know I can extract that into a profile, but that is not what I want.

Answer

mswientek picture mswientek · Feb 20, 2012

The Javadoc generation can be skipped by setting the property maven.javadoc.skip to true [1], i.e.

-Dmaven.javadoc.skip=true

(and not false)