有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java“gpg2”未被识别为内部或外部命令

我在linux中使用maven-gpg-plugin一切正常我可以安装gpg2 for sign,但在windows中部署时存在问题

有log'gpg2' is not recognized as an internal or external command, operable program or batch file.(与我得到的gpg2 --version相同)

Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (sign-artifacts) on project

如何为windows安装gpg2


共 (1) 个答案

  1. # 1 楼答案

    在您的设置中。xml文件,更改gpg.executable属性。例如

    <profiles>
        <profile>
            <id>ossrh</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <gpg.executable>gpg</gpg.executable>
                <gpg.passphrase>PASSPHRASE</gpg.passphrase>
            </properties>
        </profile>
    </profiles>