Parent pom (in multi-module project) permanently cached after first build
- Dominant language
- Java
- Stars
- 3.5k
- Forks
- 250
- Avg merge
- 16h 22m
- Merged PRs (30d)
- 36
Description
### Affected version
1.0.3
### Bug description
In a **multi-module** project, e.g.
```
├── module-1
│ ├── src
│ └── pom.xml
├──module-2
│ ├── src
│ └── pom.xml
└── pom.xml
```
after the first (per `mvnd` instance) build is run (from the root of the project), e.g.
```
mvnd package
```
the (multi-module) parent pom seems to be persistently cached by `mvnd`. Changes to the parent pom are simply ignored until the `mvnd` is restarted.
Be it
```
mvnd package
```
or even
```
mvnd clean package
```
will re-use the parent pom that was initially loaded.
If any of the modules pom files are changed though, that is picked up by `mvnd`. But the project parent pom seems to never be refreshed/reloaded. Doing
```
mvnd --stop
```
followed by
```
mvnd package
```
will pick up the changed parent pom.
In a non multi-module project no such issue occurs.
If I use `mvn` I have no such issue.
My `mvnd` command is aliased to this (not sure if relevant):
```
mvnd -ntp \
-s path/to/maven/settings.xml \
-Dmaven.repo.local=path/to/local/repo \
-Daether.dependencyCollector.impl=bf
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the multi-module layout and root pom.xml described in the report, then reproduce the issue by running mvnd package, changing the parent POM, and running it again. Compare this with mvnd --stop followed by mvnd package and with a non-multi-module project. Done means parent POM changes are detected without restarting mvnd, including after mvnd clean package.
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
- 35/100