apache / apache/maven-scm

[SCM-944] scm:validate with scmCheckWorkingDirectoryUrl interferes with scm:export execution

Open
#1,168 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
104
Forks
189
Avg merge
17h 46m
Merged PRs (30d)
6

Description

**[Niklas Matthies](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=matthies)** opened **[SCM-944](https://issues.apache.org/jira/browse/SCM-944?redirect=false)** and commented

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

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

---

**Affects:** 1.11.2

**Attachments:**
- [pom.xml](https://issues.apache.org/jira/secure/attachment/13013196/pom.xml) (_1.90 kB_)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the attached pom.xml and reproduce the Maven output using the two maven-scm-plugin executions, scm:validate and scm:export, in an SVN working copy. Trace how the validation setting from the validate execution affects export; done means validate checks its configured URL while export with a different SCM URL completes unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.