[
https://jira.codehaus.org/browse/MNG-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Benedict updated MNG-4716:
-------------------------------
Fix Version/s: (was: Issues to be reviewed for 3.x)
> Make the interpolated POM of a deployed artifact embedded too
> -------------------------------------------------------------
>
> Key: MNG-4716
> URL: https://jira.codehaus.org/browse/MNG-4716
> Project: Maven
> Issue Type: Improvement
> Components: Deployment
> Reporter: Tamás Cservenák
>
> Make the interpolated POM of a deployed artifact embedded too. Actually, the
> "original" POM embedded into deployed JAR does not have much purpose, think
> about following:
> * deploy the module's POM next to deployed artifact (just like happens now)
> * embed the _effective_ POM in effect in the moment of building the deployed
> JAR (instead of current "plain" uninterpolated POM). Or just next to it.
> Reasoning: the interpolated POM embedded is not for "downstream consumers"
> like Maven clients (builds consuming this artifact as dependency), it is
> about "how this build was built" and _should be frozen_, just like the
> deployed JAR is (eternal, not changing, just potentially being deleted in
> case of snapshots).
> I'd like to have an interpolated POM of a _deployed_ artifact that would
> describe me _how this artifact was built_.
> If we do not store interpolated POM along with the built artifact, we
> effectively loose the state of Maven project doing the build. Moreover, while
> the _repeated_ calculation of effective POM for deployed artifact _is_
> possible, for snapshot repositories, that have continuously deploys, there
> will be a moment when a _calculated effective POM_ (using the repository
> artifacts) and a state of a given snapshot may fall completely out-of-sync
> (the way JAR was built will not correspond to the effective POM you are able
> to calculate for it). This is true not for snapshot repositories, but also
> for "wrongly managed" release repositories, and also, think about staging too.
> So, ultimately, POM is "changing", yes, but only when it is consumed by a
> client (like Maven build referencing it as dependency). But during deploy, it
> is assembled in a way that is actually eternal, frozen, and JAR will stay
> like that after deployed (JARs in maven repo does NOT change, hence it's
> effective POM should not change either), since all it's parent POM, deps,
> plugins are deployed, are not "moving targets" anymore, at least from aspect
> of that one JAR being deployed.
> In short: not having effective POM for deployed artifacts makes you to
> recalculate effective POM, but the result and the effective POM of the build
> that did deploy (somewhere in past) may very well be different.
> Again, this is only to "persist the build state" of an artifact, and should
> not interfere with any of the existing way how maven uses
> artifact-version.pom in repositories. It is only about embedding the "how
> this jar was done" in the exact moment when deploy (hence build) happened.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)