[
https://issues.apache.org/jira/browse/MNG-7833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mikhail Polivakha updated MNG-7833:
-----------------------------------
Description:
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:
# Load some varaibles from file
# 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 *<configuration>* 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
was:
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:
# Load some varaibles from file
# 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 `<configuration>` 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
> Re-evaluate properties before execution
> ---------------------------------------
>
> Key: MNG-7833
> URL: https://issues.apache.org/jira/browse/MNG-7833
> Project: Maven
> Issue Type: New Feature
> Affects Versions: 4.0.0-alpha-7
> Reporter: Mikhail Polivakha
> Priority: Major
>
> 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:
> # Load some varaibles from file
> # 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 *<configuration>* 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
--
This message was sent by Atlassian Jira
(v8.20.10#820010)