Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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, 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
Attachments
Attachments
Issue Links
- causes
-
MNG-6957 Versionless reactor dependencies/parent should work even if modules are aggregated in reverse order
- Closed
-
MNG-7923 Jenkins core does not compile with Maven 4.x
- Closed
- fixes
-
MNG-6757 Cant create a proper BOM when using ${revision}
- Open
-
MNG-624 automatic parent versioning
- Closed
- incorporates
-
MNG-4463 Dependency management import should support version ranges
- Closed
-
MNG-7136 Update Maven modules structure schema to add new components
- Closed
- is a parent of
-
MNG-7182 Use a pull parser during the build/consumer transformation
- Closed
- is blocked by
-
MNG-5669 same pom.xml is read multiple times
- Closed
- is related to
-
MNG-6846 conditional overwrite
- Reopened
- relates to
-
MNG-7044 Allow use of attributes in Maven pom.xml
- Closed
-
MNG-6753 MavenMetadataSource should not use ProjectBuilder
- Open
- requires
-
MNG-6399 Lift JDK minimum to JDK 8
- Closed
- supercedes
-
MNG-6608 Why can't project.version in pom.xml be set as a variable?
- Closed
- links to
- mentioned in
-
Page Loading...