You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Niklas Matthies (Jira)" <ji...@apache.org> on 2020/10/07 15:08:00 UTC

[jira] [Commented] (SCM-944) scm:validate with scmCheckWorkingDirectoryUrl interferes with scm:export execution

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

Niklas Matthies commented on SCM-944:
-------------------------------------

The only workaround I can find is to delay the _scm:validate_ execution to a phase after the _scm:export_ execution. Apparently the _scm:validate_ execution causes global state to be modified that is then picked up by other executions.

> scm:validate with scmCheckWorkingDirectoryUrl interferes with scm:export execution
> ----------------------------------------------------------------------------------
>
>                 Key: SCM-944
>                 URL: https://issues.apache.org/jira/browse/SCM-944
>             Project: Maven SCM
>          Issue Type: Bug
>    Affects Versions: 1.11.2
>            Reporter: Niklas Matthies
>            Priority: Major
>         Attachments: pom.xml
>
>
> When having two active SCM plugin executions defined in a POM, one for _scm:validate_ with _scmCheckWorkingDirectoryUrl=true_, and one for _scm:export_ with a different SCM URL, then the export fails with "Scm url does not match the value returned by svn info" although the export doesn't have anything to do with the separate validation execution. Adding _<scmCheckWorkingDirectoryUrl>false</scmCheckWorkingDirectoryUrl>_ to the export execution doesn't help.
> Expected behavior: Only the scm:validate execution should perform a validation, based on that same execution's configuration. Other SCM plugin executions should remain unaffected.
> See the attached _pom.xml_ for a reproducible example. You need to put the project into SVN and edit the _developerConnection_ accordingly for the _scm:validate_ to succeed. The resulting Maven output is as follows:
> {quote}------------------------------------------------------------------------
> Building scm-test 1.0.0-SNAPSHOT
> ------------------------------------------------------------------------
> >>> maven-scm-plugin:1.11.2:validate (validate-scm-url) @ scm-test >>>
> <<< maven-scm-plugin:1.11.2:validate (validate-scm-url) @ scm-test <<<
> --- maven-scm-plugin:1.11.2:validate (validate-scm-url) @ scm-test ---
> Executing: cmd.exe /X /C "svn --non-interactive info"
> Working directory: whatever/scm-test
> connectionUrl scm connection string is valid.
> Executing: cmd.exe /X /C "svn --non-interactive info"
> Working directory: whatever/scm-test
> project.scm.developerConnection scm connection string is valid.
> --- maven-scm-plugin:1.11.2:export (export-test-resources) @ scm-test ---
> Executing: cmd.exe /X /C "svn --non-interactive info"
> Working directory: whatever/scm-test
> Scm url does not match the value returned by svn info ('https://host/path-to-trunk' vs. 'https://host/other-path')
> ------------------------------------------------------------------------
> {quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)