[ 
https://issues.apache.org/jira/browse/MNG-6656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17142363#comment-17142363
 ] 

Herve Boutemy edited comment on MNG-6656 at 6/21/22 9:58 AM:
-------------------------------------------------------------

done in 
[bdec668de9c600165bb69c95b6ea0625d9f74fb0|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=bdec668de9c600165bb69c95b6ea0625d9f74fb0],
 with core IT added in 
[79ed965031c27e8715c25ede79c7eb977ee26ed1|https://github.com/apache/maven-integration-testing/commit/79ed965031c27e8715c25ede79c7eb977ee26ed1]
 and documentation published 
https://maven.apache.org/ref/4-LATEST/maven-model-transform/index.html

then maven-xml renamed to maven-model-transform in 
[22954a04ffb631fefbf0e75cd056840d1248954a|https://github.com/apache/maven/commit/22954a04ffb631fefbf0e75cd056840d1248954a]
 / 
[e25cf17d3be614b52eff677ff075bbb620f07160|https://github.com/apache/maven/commit/e25cf17d3be614b52eff677ff075bbb620f07160]
 / 
[1b6caed1ea9bf1bbb46e90a23090433af0627a4f|https://github.com/apache/maven/commit/1b6caed1ea9bf1bbb46e90a23090433af0627a4f]


was (Author: rfscholte):
done in 
[bdec668de9c600165bb69c95b6ea0625d9f74fb0|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=bdec668de9c600165bb69c95b6ea0625d9f74fb0],
 with core IT added in 
[79ed965031c27e8715c25ede79c7eb977ee26ed1|https://github.com/apache/maven-integration-testing/commit/79ed965031c27e8715c25ede79c7eb977ee26ed1]

then maven-xml renamed to maven-model-transform in 
[22954a04ffb631fefbf0e75cd056840d1248954a|https://github.com/apache/maven/commit/22954a04ffb631fefbf0e75cd056840d1248954a]
 / 
[e25cf17d3be614b52eff677ff075bbb620f07160/https://github.com/apache/maven/commit/e25cf17d3be614b52eff677ff075bbb620f07160]
 / 
[1b6caed1ea9bf1bbb46e90a23090433af0627a4f/https://github.com/apache/maven/commit/1b6caed1ea9bf1bbb46e90a23090433af0627a4f]

> Introduce base for build/consumer process
> -----------------------------------------
>
>                 Key: MNG-6656
>                 URL: https://issues.apache.org/jira/browse/MNG-6656
>             Project: Maven
>          Issue Type: New Feature
>          Components: POM
>            Reporter: Robert Scholte
>            Assignee: Robert Scholte
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 4.0.0
>
>         Attachments: MNG-6656.zip
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The pom.xml as we know it has reached it limits, but it is quite hard to do 
> improvements as long as the local pom (as part of the sources) is exactly the 
> same as the file being published.
> For the Maven eco system it is important that the published file will still 
> be a model 4.0.0 to ensure other projects can still depend on these artifacts.
> This will be a first step to separate the local pom from the remote pom. The 
> process to come to the effective pom will change a little bit
> pre-build
> pom.xml (raw model) -> BuildPomXMLFilter -> inheritence -> effective pom/model
> This means that we can enrich the pom to make it a valid effective pom again.
> In this case we can do the following:
> - resolve the [cifriendly 
> placeholders|https://maven.apache.org/maven-ci-friendly.html], so it will 
> work in multimodules too.
> - resolve parent-version. By removing the version from the parent, the filter 
> will get the version based on the relativePath. If the groupId and artifactId 
> don't match, the version can't be solved and Maven will fail with a missing 
> version for the parent.
> - resolve reactor versions. By removing the versions from reactor 
> dependencies, the filter will look up the matching version. If there's no 
> version for the groupId+artifactId, the version can't be solved and Maven 
> will fail with a missing version for the dependency. 
> pre-distribution (install/deploy)
> pom.xml -> BuildPomXMLFilter -> ConsumerPomXMLFilter -> consumer pom
> This means that the XML used to build build the effective pom is used, and 
> can be adjusted during copy/upload.
> In this case we can do the following:
> - Remove the modules -elements, since this is local path information and not 
> useful after building
> - Remove the relativePath-element, since this is local path information and 
> not useful after building
> This PoC has the following goals:
> - It will give us experience with manipuating files before build AND during 
> install/deploy.
> - We can see IDEs and CI servers can handle this and how we can move forward.
> This feature will at first be disabled by default and can be activated with 
> the System property {{maven.experimental.buildconsumer=true}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to