apache / apache/maven-scm

[SCM-798] scm:branch ignores the tagBase parameter, there is no branchBase parameter

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

Description

**[Jakub Bochenski](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jbochenski)** opened **[SCM-798](https://issues.apache.org/jira/browse/SCM-798?redirect=false)** and commented

```
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-scm-plugin:1.9.4:branch' with basic configurator -->
[DEBUG] (f) basedir = /home/acme/gotham/common_ui
[DEBUG] (f) branch = 2.2/2.2.0
[DEBUG] (f) connectionType = connection
[DEBUG] (s) connectionUrl = scm:svn:svn+ssh://svn@svn.acme.com/repos/trunk/common_ui
[DEBUG] (f) developerConnectionUrl = scm:svn:svn+ssh://svn@svn.acme.com/repos/trunk/common_ui
[DEBUG] (f) pushChanges = true
[DEBUG] (f) remoteBranching = false
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter@7b300cde
[DEBUG] (f) tagBase = svn+ssh://svn@svn.acme.com/repos/branches/common_ui
[DEBUG] -- end configuration --
[INFO] Final Branch Name: '2.2/2.2.0'
[INFO] Executing: /bin/sh -c cd /home/acme/gotham/common_ui && svn --non-interactive copy --file /tmp/maven-scm-1267210601.commit . svn+ssh://svn@svn.acme.com/repos/branches/2.2/2.2.0
```

I can see this code handling `tagBase`, but there is none for `branchBase`

```
if ( !StringUtils.isEmpty( tagBase ) && repository.getProvider().equals( "svn" ) )
{
SvnScmProviderRepository svnRepo = (SvnScmProviderRepository) repository.getProviderRepository();
svnRepo.setTagBase( tagBase );
}
```

Adding a parallel handling for `branchBase` param should be trivial.

Correcting the documentation is another thing -- the `tagBase` parameter is present on the base Mojo class even though it's ignored in some goals.

---

**Affects:** 1.9.4

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the scm:branch goal's parameter handling and repository setup, using the shown SvnScmProviderRepository tagBase handling as the comparison point. Check the base Mojo documentation for tagBase and branch-related parameters; done means branchBase is supported for branching and the parameter documentation no longer implies tagBase applies uniformly to every goal.

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
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.