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

前端 未结 5 544
别跟我提以往
别跟我提以往 2020-12-12 10:48

In pom.xml I have declaration like this

    
        org.apache.maven.plugins

        
相关标签:
5条回答
  • 2020-12-12 11:12

    Add to the release plugin config in the root-level pom.xml:

    <configuration>
        <arguments>-Dmaven.javadoc.skip=true</arguments>
    </configuration>
    
    0 讨论(0)
  • 2020-12-12 11:20

    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)

    0 讨论(0)
  • 2020-12-12 11:23

    You can use the maven.javadoc.skip property to skip execution of the plugin, going by the Mojo's javadoc. You can specify the value as a Maven property:

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

    or as a command-line argument: -Dmaven.javadoc.skip=true, to skip generation of the Javadocs.

    0 讨论(0)
  • 2020-12-12 11:32

    For newbie Powershell users it is important to know that '.' is a syntactic element of Powershell, so the switch has to be enclosed in double quotes:

    mvn clean install "-Dmaven.javadoc.skip=true"

    0 讨论(0)
  • 2020-12-12 11:33

    It seems, that the simple way

    -Dmaven.javadoc.skip=true
    

    does not work with the release-plugin. in this case you have to pass the parameter as an "argument"

    mvn release:perform -Darguments="-Dmaven.javadoc.skip=true"
    
    0 讨论(0)
提交回复
热议问题