Releases from HG fail if project is not in root of repository
-------------------------------------------------------------

                 Key: MRELEASE-717
                 URL: https://jira.codehaus.org/browse/MRELEASE-717
             Project: Maven 2.x Release Plugin
          Issue Type: Bug
          Components: prepare
    Affects Versions: 2.2.1, 2.1
         Environment: Windows 7, Java 6, HG 1.9.3
            Reporter: Karl M. Davis
            Priority: Critical


Given the following HG respo structure, trying to release {{mavenProjectC}} 
fails:
{noformat}
repoA/
  stuffA/
  stuffB/
  mavenProjectC/
{noformat}

Specifically, I receive the following error when trying to run 
{{release:prepare}}:
{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-release-plugin:2.2.1:prepare (default-cli) on 
project mavenProjectC: Unable to commit files
[ERROR] Provider message:
[ERROR]
[ERROR] EXECUTION FAILED
[ERROR] Execution of cmd : push failed with exit code: -1.
[ERROR] Working directory was:
[ERROR] C:\workspaces\repoA\mavenProjectC
[ERROR] Your Hg installation seems to be valid and complete.
[ERROR] Hg version: 1.9.3 (OK)
{noformat}

I believe this is the same issue reported by Lee Thompson in [his 2011-07-12 
comment|http://jira.codehaus.org/browse/MRELEASE-457?focusedCommentId=270210&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-270210]
 on MRELEASE-457. It seems there is currently no way to inform the release 
plugin that it's operating in a repository subdirectory.

Lee recommended a {{pomSubDirectory}} parameter be added to the relevant goals, 
which I also think will be necessary to solve this issue. I would recommend 
instead naming it {{repoRelativePath}}, though.

There's also the issue of what paths should be included in the POM's {{<scm/>}} 
section, as well. Currently, I'm listing something similar to the following:
{noformat}
<scm>
  <connection>scm:hg:http://myserver/repoA/mavenProjectC</connection>
</scm>
{noformat}

It's unclear if this is the "correct" way to list it, as opposed to truncating 
it to only the repository's path itself.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to