apache / apache/maven-compiler-plugin
[MCOMPILER-397] Use relative paths in jpms.args to make the builds reproducible
- Dominant language
- Java
- Stars
- 261
- Forks
- 191
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 8
Description
**[Emmanuel Bourg](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ebourg)** opened **[MCOMPILER-397](https://issues.apache.org/jira/browse/MCOMPILER-397?redirect=false)** and commented
The `jpms.args` file generated since the version 3.7 contains absolute paths, for example here is the file generated for jaxb-core:
```
--add-modules
java.xml.bind
--upgrade-module-path
/home/ebourg/jaxb/jaxb-ri/core/target/endorsed
```
The absolute path affects the reproducibility of the builds. Someone else rebuilding the project is unlikely to have the same base path and will not get a byte identical artifact. I suggest using a relative path instead (starting at the root of the project or at the root of the module) and normalizing the path separators (such that builds on Windows and Unix generate the same file).
---
**Affects:** 3.8.1
**Remote Links:**
- [GitHub Pull Request #193
](https://github.com/apache/maven-compiler-plugin/pull/193)
1 votes, 2 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the code that generates the jpms.args file for modules such as jaxb-core and inspect the linked Pull Request #193 for existing work. Done means generated files use relative paths and normalize path separators so rebuilds on Windows and Unix are byte-identical.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100