[MNG-7833] Re-evaluate properties before execution
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Mikhail Polivakha](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=misha2048)** opened **[MNG-7833](https://issues.apache.org/jira/browse/MNG-7833?redirect=false)** and commented
This Jira ticket is inspired by GitHub issue: https://github.com/mojohaus/properties-maven-plugin/issues/39
The problem: there are some plugins online, like **properties-maven-plugin** for instance, that load maven properties from different locations. And developers often want to use such plugins like this:
1. Load some varaibles from file
2. Dynamically apply this varaibles as a plugin configuration parameter
The problem is that the DOM of pm.xml seems to be parsed before any plugin took place which is perfectly reasonable to assume. But I think we should improve on that: **Can we re-evaluate tags values when it is actaully used?**
What do I mean - let's say we declare **properties-maven-plugin** that laod proeprties at **validate** stage. After that we have an **assembly-maven-plugin** at **package** stage, which assembles the tar archive. The name of the archive is detemrmined in the **** by **tar.archive.name** variable. But currently it does not matter if this variable was loaded by **proeprties-maven-plugin** - we evaluated pom.xml DOM before any build. The point of this Jira ticket is to change that and, if **tar.archive.name** was declared in the file loaded by **properties-maven-plugin** to be re-evaluated when **assembly-maven-plugin** actually gets executed
---
**Affects:** 4.0.0-alpha-7
**Issue Links:**
- [MNG-7914](https://issues.apache.org/jira/browse/MNG-7914) Add a new maven.properties file
Contributor guide
Research direction
Start by reading the MNG-7833 description and the linked properties-maven-plugin issue, then trace how pom.xml configuration is evaluated before validate and package execution. Define completion as a tested Maven-core behavior in which properties loaded during an earlier lifecycle phase affect later plugin configuration, including the assembly-maven-plugin example; no source files or tests are named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100