[
https://issues.apache.org/jira/browse/SCM-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17962560#comment-17962560
]
ASF GitHub Bot commented on SCM-677:
------------------------------------
jira-importer opened a new issue, #893:
URL: https://github.com/apache/maven-scm/issues/893
**[Olexandra](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=olexandra)**
opened
**[SCM-677](https://issues.apache.org/jira/browse/SCM-677?redirect=false)** and
commented
It's impossible to add a directory using scm:add goal.
I have the following (simplified) folder structure under SCM:
```
<project_root>/pom.xml
<project_root>/folder1/file1.txt
```
When I try to add a new folder 'folder2' into the working copy using command
```
mvn scm:add -Dincludes=folder2
```
I get an error:
```
Cannot run add command : Exception while executing SCM command. You must
provide at least one file/directory to add
```
If I specify trailing slash for 'includes', i.e.
```
mvn scm:add -Dincludes=folder2/
```
I get an error like
```
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: 'folder2' is not a working copy
```
Seems the problem is that `ScmFileSet` filters out all directories leaving
only files
---
**Affects:** 1.7
1 votes, 2 watchers
> AddMojo doesn't support adding a directory
> ------------------------------------------
>
> Key: SCM-677
> URL: https://issues.apache.org/jira/browse/SCM-677
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-plugin
> Affects Versions: 1.7
> Reporter: Olexandra
> Priority: Major
>
> It's impossible to add a directory using scm:add goal.
> I have the following (simplified) folder structure under SCM:
> {panel}
> <project_root>/pom.xml
> <project_root>/folder1/file1.txt
> {panel}
> When I try to add a new folder 'folder2' into the working copy using command
> {panel}
> mvn scm:add -Dincludes=folder2
> {panel}
> I get an error:
> {panel}
> Cannot run add command : Exception while executing SCM command. You must
> provide at least one file/directory to add
> {panel}
> If I specify trailing slash for 'includes', i.e.
> {panel}
> mvn scm:add -Dincludes=folder2/
> {panel}
> I get an error like
> {panel}
> [ERROR] Provider message:
> [ERROR] The svn command failed.
> [ERROR] Command output:
> [ERROR] svn: 'folder2' is not a working copy
> {panel}
> Seems the problem is that {{ScmFileSet}} filters out all directories leaving
> only files
--
This message was sent by Atlassian Jira
(v8.20.10#820010)