Ashley Taylor
Ashley Taylor

Reputation: 165

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

I'm trying to configure the maven release plugin to make use of the new shallow option provided by maven-scm-provider-gitexe. My pom looks like the following

<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>

But this causes the following error

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

have also tried with version maven-release-plugin version 2.5.3

Upvotes: 3

Views: 2998

Answers (1)

Gilles
Gilles

Reputation: 76

Maybe just add the missing dependency

<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>

Upvotes: 6

Related Questions