如何从命令行禁用Maven Javadoc插件? [英] How can I disable the Maven Javadoc plugin from the command line?

查看:650
本文介绍了如何从命令行禁用Maven Javadoc插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在pom.xml中我有这样的声明

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.

推荐答案

可以通过将属性 maven.javadoc.skip 设置为true来跳过Javadoc生成[ 1 ],即

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

-Dmaven.javadoc.skip=true

(而不是假)

这篇关于如何从命令行禁用Maven Javadoc插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆