You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2015/08/31 17:35:45 UTC

[jira] [Commented] (MRELEASE-921) perform goal doesn't support providerImplementation

    [ https://issues.apache.org/jira/browse/MRELEASE-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14723553#comment-14723553 ] 

Robert Scholte commented on MRELEASE-921:
-----------------------------------------

The name of the class is a bit confusing, but the {{AbstractScmReleaseMojo}} handles the scm tasks as done for both {{prepare}} and {{branch}}, i.e committing and tagging. In the past the {{perform}} had too much parameters which didn't make any sense within this context, so the {{AbstractScmReleaseMojo}} was introduced. So the {{perform}} goal should not extend this class. Instead the required parameters should be copied or we need to another Abstract class.

> perform goal doesn't support providerImplementation
> ---------------------------------------------------
>
>                 Key: MRELEASE-921
>                 URL: https://issues.apache.org/jira/browse/MRELEASE-921
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: perform
>    Affects Versions: 2.5.2
>            Reporter: Georges-Etienne Legendre
>         Attachments: fix-perform.diff
>
>
> I am using the maven release plugin with git, trying to use the *jgit* provider.
> {code:title=pom.xml|xml}
> ...
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-scm-plugin</artifactId>
>     <version>${maven-scm-plugin.version}</version>
>     <configuration>
>         <providerImplementations>
>             <git>jgit</git>
>         </providerImplementations>
>     </configuration>
>     <dependencies>
>         <dependency>
>             <groupId>org.apache.maven.scm</groupId>
>             <artifactId>maven-scm-provider-jgit</artifactId>
>             <version>1.9.4</version>
>         </dependency>
>     </dependencies>
> </plugin>
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-release-plugin</artifactId>
>     <version>2.5.2</version>
>     <configuration>
>         <tagNameFormat>@{project.version}</tagNameFormat>
>         <goals>deploy</goals>
>         <autoVersionSubmodules>true</autoVersionSubmodules>
>         <providerImplementations>
>             <git>jgit</git>
>         </providerImplementations>
>     </configuration>
>     <dependencies>
>         <dependency>
>             <groupId>org.apache.maven.scm</groupId>
>             <artifactId>maven-scm-provider-jgit</artifactId>
>             <version>1.9.4</version>
>         </dependency>
>     </dependencies>
> </plugin>
> ...
> {code}
> This is how I run prepare:
> {code}
> mvn -X release:prepare
> {code}
> This works fine, here an excerpt from the command output:
> {code}
> ...
> [DEBUG] Goal:          org.apache.maven.plugins:maven-release-plugin:2.5.2:prepare (default-cli)
> [DEBUG] Style:         Aggregating
> [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
>   <addSchema default-value="true">${addSchema}</addSchema>
>   <allowReleasePluginSnapshot default-value="false">${allowReleasePluginSnapshot}</allowReleasePluginSnapshot>
>   <allowTimestampedSnapshots default-value="false">${ignoreSnapshots}</allowTimestampedSnapshots>
>   <arguments>${arguments}</arguments>
>   <autoVersionSubmodules default-value="false">true</autoVersionSubmodules>
>   <basedir default-value="${basedir}"/>
>   <checkModificationExcludeList>${checkModificationExcludeList}</checkModificationExcludeList>
>   <commitByProject default-value="false">${commitByProject}</commitByProject>
>   <completionGoals default-value="">${completionGoals}</completionGoals>
>   <developmentVersion>${developmentVersion}</developmentVersion>
>   <dryRun default-value="false">${dryRun}</dryRun>
>   <generateReleasePoms default-value="false">${generateReleasePoms}</generateReleasePoms>
>   <javaHome default-value="${java.home}"/>
>   <localRepoDirectory default-value="${maven.repo.local}"/>
>   <mavenExecutorId default-value="invoker">${mavenExecutorId}</mavenExecutorId>
>   <mavenHome default-value="${maven.home}"/>
>   <password>${password}</password>
>   <pomFileName>${pomFileName}</pomFileName>
>   <preparationGoals default-value="clean verify">${preparationGoals}</preparationGoals>
>   <project default-value="${project}"/>
>   <projectVersionPolicyId default-value="default">${projectVersionPolicyId}</projectVersionPolicyId>
>   <providerImplementations>
>     <git>jgit</git>
>   </providerImplementations>
>   <pushChanges default-value="true">${pushChanges}</pushChanges>
>   <reactorProjects default-value="${reactorProjects}"/>
>   <releaseVersion>${releaseVersion}</releaseVersion>
>   <remoteTagging default-value="true">${remoteTagging}</remoteTagging>
>   <resume default-value="true">${resume}</resume>
>   <scmCommentPrefix default-value="[maven-release-plugin] ">${scmCommentPrefix}</scmCommentPrefix>
>   <session default-value="${session}"/>
>   <settings default-value="${settings}"/>
>   <suppressCommitBeforeTag default-value="false">${suppressCommitBeforeTag}</suppressCommitBeforeTag>
>   <tag>${tag}</tag>
>   <tagNameFormat default-value="@{project.artifactId}-@{project.version}">@{project.version}</tagNameFormat>
>   <updateDependencies default-value="true">${updateDependencies}</updateDependencies>
>   <updateWorkingCopyVersions default-value="true">${updateWorkingCopyVersions}</updateWorkingCopyVersions>
>   <useEditMode default-value="false">${useEditMode}</useEditMode>
>   <username>${username}</username>
>   <waitBeforeTagging default-value="0">${waitBeforeTagging}</waitBeforeTagging>
> </configuration>
> ...
> {code}
> Now I run perform:
> {code}
> mvn -X release:perform
> {code}
> And this is what maven sees:
> {code}
> ...
> [DEBUG] Goal:          org.apache.maven.plugins:maven-release-plugin:2.5.2:perform (default-cli)
> [DEBUG] Style:         Aggregating
> [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
>   <arguments>${arguments}</arguments>
>   <basedir default-value="${basedir}"/>
>   <connectionUrl>${connectionUrl}</connectionUrl>
>   <dryRun default-value="false">${dryRun}</dryRun>
>   <goals>deploy</goals>
>   <javaHome default-value="${java.home}"/>
>   <localCheckout default-value="false">${localCheckout}</localCheckout>
>   <localRepoDirectory default-value="${maven.repo.local}"/>
>   <mavenExecutorId default-value="invoker">${mavenExecutorId}</mavenExecutorId>
>   <mavenHome default-value="${maven.home}"/>
>   <password>${password}</password>
>   <pomFileName>${pomFileName}</pomFileName>
>   <project default-value="${project}"/>
>   <reactorProjects default-value="${reactorProjects}"/>
>   <releaseProfiles>${releaseProfiles}</releaseProfiles>
>   <session default-value="${session}"/>
>   <settings default-value="${settings}"/>
>   <useReleaseProfile default-value="true">${useReleaseProfile}</useReleaseProfile>
>   <username>${username}</username>
>   <workingDirectory default-value="${project.build.directory}/checkout">${workingDirectory}</workingDirectory                                                                                                  >
> </configuration>
> ...
> {code}
> Obviously *providerImplementations* is not present in the second output and maven is trying to find a command line git... I want to get it running without a command line git.
> I'm running this on Windows, with Maven 3.3.3.
> Looking at the code, I see that *PerformReleaseMojo* extends from *AbstractReleaseMojo* instead of *AbstractScmReleaseMojo*... any reason?
> Someone with the same issue here on Stackoverflow: http://stackoverflow.com/questions/27394876/mvnperform-does-not-pull-the-providerimplementations



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)