[SCM-920] Maven SCM plugin issue with flat multi module relative paths
- Dominant language
- Java
- Stars
- 104
- Forks
- 189
- Avg merge
- 17h 46m
- Merged PRs (30d)
- 6
Description
**[Javier Peña](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=xavipen)** opened **[SCM-920](https://issues.apache.org/jira/browse/SCM-920?redirect=false)** and commented
Hi,
I am trying to apply the [Tycho Release Workflow](https://wiki.eclipse.org/Tycho/Release_Workflow) and everything goes well as long as i use a tree structure for the project. As soon as I try to use a flat multi module structure the release fails because of the Maven SCM plugin can not find the files.
Original configuration of the maven-scm-plugin as defined in the workflow is:
```java
**/META-INF/MANIFEST.MF,
**/feature.xml,
*/.product,
**/category.xml
*/target/*
Changing the Eclipse files versions
```
The structure is as follows:
build -> pom.xml (parent pom)
module1 -> pom.xml
module2 -> pom.xml
First attempt to fix the issue was to use relative paths to the include section so I try the follwoing:
```java
../module1/META-INF/MANIFEST.MF,
../module2/feature.xml,
../module4/*.product,
../module3/category.xml
*/target/*
Changing the Eclipse files versions
```
maven-scm-plugin still could not find the files.
Second attempt was to change the basedir instead:
```java
${basedir}/..
**/META-INF/MANIFEST.MF,
**/feature.xml,
*/.product,
**/category.xml
*/target/*
Changing the Eclipse files versions
```
This got me an step further because the files where found by the plugin the problem was that maven-scm-plugin was adding the build folder incorrectly in front of the path of the files being added. This was the output:
```java
Executing: /bin/sh c cd '/srv/tools/jenkins/jobs/SSP(dev)/workspace/build/..' && 'git' 'add' '-' 'build/module3/category.xml' 'build/module2/feature.xml' 'build/module1/META-INF/MANIFEST.MF' 'build/module4/xyz.product'
```
After this I tried to also configured the workingDirectory but it only made it worst.
---
**Affects:** 1.11.1
**Attachments:**
- [flat-tycho-project-master.zip](https://issues.apache.org/jira/secure/attachment/12959103/flat-tycho-project-master.zip) (_14.41 kB_)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with the attached flat-tycho-project-master.zip and its parent and module pom.xml files. Start by tracing Maven SCM's basedir and path handling around the git add invocation shown in the report. Done means a flat multi-module layout finds the files and passes repository-relative paths to git without the extra build directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100