如何配置 maven-release-plugin 以使用 maven-scm-provider-gitexe 'shallow' 选项

How to configure maven-release-plugin to use maven-scm-provider-gitexe 'shallow' option

我正在尝试配置 maven 发布插件以利用 maven-scm-provider-gitexe 提供的新浅选项。 我的 pom 如下所示

<properties>
    <shallow>true</shallow>
</properties>
<pluginManagement>
    <plugins>
        <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <dependencies>
                <dependency>
                    <groupId>org.apache.maven.scm</groupId>
                    <artifactId>maven-scm-provider-gitexe</artifactId>
                    <version>1.10.0</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</pluginManagement>

但这会导致以下错误

Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:perform (default-cli) on project dory-interfaces: Execution default-cli of goal org.apache.maven.plugins:maven-release-plugin:2.3.2:perform failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-release-plugin:2.3.2:perform: java.lang.NoSuchFieldError: SHALLOW
-----------------------------------------------------
realm =    plugin>org.apache.maven.plugins:maven-release-plugin:2.3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:.m2/repository/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.jar
urls[1] = file:.m2/repository/org/apache/maven/scm/maven-scm-provider-gitexe/1.10.0/maven-scm-provider-gitexe-1.10.0.jar
urls[2] = file:.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
urls[3] = file:.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar

也尝试过版本 maven-release-plugin 版本 2.5.3

也许只需添加缺少的依赖项

<plugin>
    <artifactId>maven-release-plugin</artifactId>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-api</artifactId>
            <version>1.10.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.10.0</version>
        </dependency>
    </dependencies>
</plugin>