https://linktr.ee/khmarbaise
Email: maven4@soebes.de
Dipl.Ing.(FH) Karl Heinz Marbaise
Apache Maven
Version
4.0.0 – beta X
2
About me
●
Apache Maven Committer
– since Dec. 2013
●
Apache Maven PMC Member
– since August 2014
●
Apache Software Foundation Member
– since April 2017
●
Apache Maven Project Chairman
– Since April 2022
3
Agenda
●
Apache Maven Ecosystem
●
Maven Ecosystem
●
Architecture
●
Consumer/Build POM
●
Reactor Enhancements
●
Improvements / News
●
JDK Requirement
4
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
5
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
• Core: clean, compiler, resources, install,
deploy, surefire, …
• Packaging: jar, war, shade, source, jlink,
jmod, …
• Reporting: site, javadoc, jxr, pmd, jdeps,
checkstyl, ...
• Tools: archetype, assembly, enforcer,
dependency, …
6
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent
POMs
Archetypes
Indexer
• ASF Maven Parent
• Maven Parent
• Maven Plugin Parent
• Maven Shared Parent
• Maven Skins Parent
• Apache Resource Bundle
7
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
• maven-archiver
• maven-invoker
• maven-filtering
• maven-dependency-analyzer
• maven-jarsigner
• maven-shared-utils
• maven-shared-io
• ...
8
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
• Doxia Core
• Doxia Site Tools
• Doxia Modules
● apt, xdoc, markdown,FML, …
• ...
9
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
• Maven Default Skin
• Maven Fluido Skin
• Maven Application Skin
• Maven Classic Skin
• Maven Stylus Skin
10
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
• maven-archetype-j2ee-simple
• maven-archetype-plugin
• maven-archetype-quickstart
• ...
11
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
• aka Eclipse Aether (2016)
http://incubator.apache.org/ip-
clearance/maven-aether.html
12
Apache Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
13
Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
Plexus Components (~13) MojoHaus Plugins (~80)
• https://github.com/codehaus-plexus
https://github.com/codehaus-plexus
● plexus-classworlds
● plexus-modello
● plexus-utils
● plexus-archiver
● plexus-io
● plexus-languages
● Plexus-interpolation
...
14
Maven Ecosystem
Maven Plugins (~50)
Maven
Core Core
ITs
Artifact Resolver
Maven Shared Components (~25)
Doxia
Skins
Parent POMs
Archetypes
Indexer
Plexus Components (~13) MojoHaus Plugins (~80)
• https://github.com/mojohaus/
https://github.com/mojohaus/
● mrm-maven-plugin
● versions-maven-plugin
● build-helper-maven-plugin
● buildnumber-maven-plugin
● animal-sniffer-maven-plugin
● appassembler-maven-plugin
● jaxb2-maven-plugin
● flatten-maven-plugin
● exec-maven-plugin
● rpm-maven-plugin
● templating-maven-plugin
● ...
15
Architecture
Maven 2 - 2005
16
Architecture
Maven 3 - 2010
17
Architecture
Maven 3.5+ - 2017
18
Architecture
Maven 4.X - 2020-2024
19
Consumer / Build POM
POM V4
●
Maven 1 started with the story
modelVersion 3.0.0
●
Maven 2/3 has continued the story with
modelVersion 4.0.0
<project ...>
<modelVersion>4.0.0</modelVersion>
…
</project>
20
Consumer / Build POM
POM V4
●
The pom declarares the following
information:
●
dependencies, dependencyManagement
●
plugins, pluginManagement
●
profiles, repositories
●
build, reporting
●
distributionManagement
●
etc.
21
Consumer / Build POM
POM V4
●
The function of a POM:
1.Serves as declarative description of
the build process for a project.
2.Serves as a description of the project
dependency graph.
22
Consumer / Build POM
POM V4
●
Changing the POM format?
– The POM is consumed by:
●
Apache BuildR, Gradle, Apache Ivy, sbt
●
by IDE's
●
and many other tools
– as a description of dependencies.
23
Consumer / Build POM
POM V4
●
Requirements to change the POM
format:
– All tools would needed to be changed.
– We have to fork
fork Central Repository.
24
Consumer / Build POM
POM V4
●
Requirements to change the POM
format:
– All tools would needed to be changed.
– We have to fork
fork Central Repository.
25
Consumer / Build POM
POM V4+
Build
Information
POM V4+ POM V4
Consumer POM
Central Repository
Build POM
Project Dependency Tree (PDT)
26
Consumer / Build POM
POM V4
●
POM V4 a.k.a. Consumer POM
Consumer POM
– Contains only dependencies (+
dependencyManagement)
– Remove all properties / build / modules
/ parent / ….
– See flatten-maven-plugin
●
https://cwiki.apache.org/confluence/display/MAVEN/Build+vs+Consumer+POM
28
POM V4+ → Maven 4.X
●
Core must be able to read:
– POM V4
– POM V4+
●
Core must be able to produce POM V4
●
https://cwiki.apache.org/confluence/display/MAVEN/Build+vs+Consumer+POM
29
Improvements / News
●
Maven 3.9.X (3.9.0...3.9.9 in 2024)
– Bug fixing and improvements
– Moved away from Wagon to Maven
Resolver (aka native HTTP).
– Plugin API changes with some hints as
preparation for Maven 4.X
You might have seen some of them!
●
„-Dmaven.plugin.validation=verbose“
●
https://maven.apache.org/docs/history.html
●
https://maven.apache.org/guides/mini/guide-resolver-transport.html
30
Improvements / News
●
Maven 3.9.X (3.9.0...3.9.9 in 2024)
– Since Maven 2 ancient version of
plexus-utils was injected. Not done
anymore (might break something!).
– No bootstrap of RepositorySystem (via
deprecated ServiceLocator!)
– Support for „mvn
pluginPrefix:version:goal” invocation
https://maven.apache.org/docs/history.html
31
Improvements / News
●
Maven 3.9.X (3.9.0...3.9.9 in 2024)
– Removed some deps for example
commons-lang (some kind of diet ;-))
https://maven.apache.org/docs/history.html
32
Improvements / News
●
Maven 3.9.2+
– Use the Force Luke:
– Create an „.mvn“ directory.
– New properties (only from
.mvn/maven.config or CL):
●
session.topDirectory – reactor top
●
session.rootDirectory – project root
(where „.mvn“ required!).
https://maven.apache.org/docs/3.9.2/release-notes.html
33
Improvements / News
●
Maven 4 – 4.0.0-alpha-7 (Jun 2023)
– Build/Consumer POM
– A lot of reactor improvements
– Plugin API Changes
●
Some of them are breaking changes!
See 3.9.X
– Identifiy root location of multi module
build („.mvn/“ or POM configuration).
https://cwiki.apache.org/confluence/display/MAVEN/Build+vs+Consumer+POM
34
Improvements / News
●
Maven 4 – 4.0.0-alpha-8 (20. Oct 2023)
– Switch to Woodstox XML
– Introduce Model Version 4.1.0
●
„root“ element in version 4.1.0
– Glob Pattern for exclusions
<excludes>
<exclude>
<groupId>com.jdom.*</groupId>
<artifactId>*</artifactId>
</exclude>
</excludes>
35
Improvements / News
●
Maven 4 – 4.0.0-alpha-8 (20. Oct 2023)
– „BOM“ Packaging, Trim down
consumer POM
– Core Extension in .m2
– Alternate POM Syntax possible
●
MNG-7836
https://maven.apache.org/docs/4.0.0-alpha-8/release-notes.html
36
Improvements / News
●
Maven 4 – 4.0.0-alpha-8 (20. Oct 2023)
– POM Goal Ordering (MNG-7804,
Model 4.1.0):
<execution>
<id>400. This should be fourth</id>
<goals>
<goal>run</goal>
</goals>
<phase>clean</phase>
<priority>400</priority>
</execution>
37
Improvements / News
●
Maven 4 – 4.0.0-alpha-8 (20. Oct 2023)
– Support configuration in
extensions.xml (MNG-7891) (basic).
– support for exclusions when importing
BOMs
38
Improvements / News
●
Maven 4 – 4.0.0-alpha-10 (11.Dec 2023)
– Fixed broken javadoc:jar
– Resolver fixes.
https://maven.apache.org/docs/4.0.0-alpha-10/release-notes.html
39
Improvements / News
●
Maven 4 – 4.0.0-alpha-12 (12.Jan 2024)
– Resolver 2.0.0-alpha-6
– Collection filtering
– Resolvers transitive dependency
manager.
– No resolving of projects outside the
reactor.
https://maven.apache.org/docs/4.0.0-alpha-12/release-notes.html
40
Improvements / News
●
Maven 4 – 4.0.0-alpha-13 (6. Mar 2024)
– JDK 17+
– Resolver 2.0.0-alpha-8.
– WARN on BOM import in the same
reactor.
– Profile activation based on packaging.
– Conflict deps vs. depMgmt. (WARN!)
41
Improvements / News
●
Maven 4 – 4.0.0-beta-3 (22. May 2024)
– Control path where each dep can be
placed; module-path, classpath, doclet
●
<type>jar</type>
– CLASSES and MODULES.
●
<type>modular-jar</type>
– MODULES only.
●
<type>classpath-jar</type>
– CLASSES only.
42
Improvements / News
●
Maven 4 – 4.0.0-beta-3 (22. May 2024)
– <type>fatjar</type>
●
self contained jar; stops resolving
dependencies
– Same repo Id’s settings.xml vs.
pom.xml not detected.
43
Improvements / News
●
Maven 4 – 4.0.0-beta-4 (02. Sept 2024)
– New Phases: before:X, after:X
●
(before:|after:)$phase([$priority])
– For example:
●
before:package, before:integration-test
after:integration-test, after:package,
before:all, after:all etc.
https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases
44
Improvements / News
●
Basic Idea to have only:
– A Life Cycle phase for example:
●
clean
– And there is a „before:clean“ and
„after:clean“.
– Instead of „pre-clean“, „post-clean“..
45
Improvements / News
Current Tranisational Future
pre-clean deprecated before:clean
clean clean
post-clean deprecated after:clean
46
Improvements / News
Current Tranisational Future
generate-sources deprecated before:sources
????? sources
process-sources deprecated after:sources
generate-resources deprecated before:resources
????? resources
process-resources deprecated after:resources
????? before:compile
compile compile
process-classes deprecated after:compile
47
Improvements / News
Current Tranisational Future
generate-test-sources deprecated before:test-sources
????? test-sources
process-test-sources deprecated after:test-sources
generate-test-resources deprecated before:test-resources
????? test-resources
process-test-resources deprecated after:test-resources
????? before:test-compile
test-compile test-compile
process-test-classes deprecated after:test-compile
48
Improvements / News
Current Tranisational Future
????? deprecated before:test
test test
????? after:test
prepare-package deprecated before:package
package package
????? after:package
49
Improvements / News
Current Tranisational Future
pre-integration-test deprecated before:integration-test
integration-test integration-test
post-integration-test deprecated after:integration-test
50
Improvements / News
Current Tranisational Future
before:verify
verify verify
after:verify
before:install
install install
after:install
before:deploy
deploy deploy
after:deploy
51
Improvements / News
Current Tranisational Future
pre-site deprecated before:site
site site
post-site deprecated after:site
before:site-deploy
site-deploy site-deploy
after:site-deploy
52
Improvements / News
●
Maven 4 – 4.0.0-beta-4 (02. Sept 2024)
– Model Version 4.1.0
●
Deprecated „<modules>..</modules>“
also the term „multi module project“
●
So now we have „multi-project“ setup.
●
Use
„<subprojects><subproject>..</subpr
oject></subprojects>“ instead.
53
Current working….
●
Maven 4 – 4.0.0-beta-5 (????)
– New CLI component for reuse (for
example in mvnd
– New CLI for password management
– Interpolation Service API
– …
54
Minimum JDK Runtime
Requirements
●
...
●
JDK 6: Maven 3.2.X...3.2.5
●
JDK 7: Maven 3.3.X…3.8.8
●
JDK 8: Maven 3.9.0...3.9.8
●
JDK 8: ….Maven 4.0.0-alpha-12 (BT: 11)
●
JDK 17: Maven 4.0.0-alpha-13….
https://maven.apache.org/docs/history.html
55
Minimum JDK Runtime
Requirements
●
Maven 4.0.0-alpha-13+ (12. March
2024)
– Runtime requirement: JDK 17+
– Buildtime requirement: JDK17+
https://lists.apache.org/thread/bfkvvjftrxypp06yj8zj919fcz0dt2zt
56
Maven 4.0.0+ - Plugins
●
The following plugins:
●
maven-clean-plugin
●
maven-compiler-plugin
●
maven-deploy-plugin
●
maven-install-plugin
●
maven-jar-plugin
●
maven-resources-plugin
●
Maven-source-plugin
– Version 4.0.0-beta-1 (Maven 4 only!)
57
Performance
●
Maven Cache Extension
– Incremental builds works on the modified part of the
project graph part only
– Subtree support for multimodule projects to work on
the part of the codebase in isolation
– Version normalization to support project version
agnostic caches
– Project state restoration (partial) to avoid expensive
tasks (code generation and similar)
https://maven.apache.org/extensions/maven-build-cache-extension/
58
Thank you!
Questions?
https://linktr.ee/khmarbaise

Current State of Apache Maven 4 Development

  • 1.
    https://linktr.ee/khmarbaise Email: maven4@soebes.de Dipl.Ing.(FH) KarlHeinz Marbaise Apache Maven Version 4.0.0 – beta X
  • 2.
    2 About me ● Apache MavenCommitter – since Dec. 2013 ● Apache Maven PMC Member – since August 2014 ● Apache Software Foundation Member – since April 2017 ● Apache Maven Project Chairman – Since April 2022
  • 3.
    3 Agenda ● Apache Maven Ecosystem ● MavenEcosystem ● Architecture ● Consumer/Build POM ● Reactor Enhancements ● Improvements / News ● JDK Requirement
  • 4.
    4 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer
  • 5.
    5 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer • Core: clean, compiler, resources, install, deploy, surefire, … • Packaging: jar, war, shade, source, jlink, jmod, … • Reporting: site, javadoc, jxr, pmd, jdeps, checkstyl, ... • Tools: archetype, assembly, enforcer, dependency, …
  • 6.
    6 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer • ASF Maven Parent • Maven Parent • Maven Plugin Parent • Maven Shared Parent • Maven Skins Parent • Apache Resource Bundle
  • 7.
    7 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer • maven-archiver • maven-invoker • maven-filtering • maven-dependency-analyzer • maven-jarsigner • maven-shared-utils • maven-shared-io • ...
  • 8.
    8 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer • Doxia Core • Doxia Site Tools • Doxia Modules ● apt, xdoc, markdown,FML, … • ...
  • 9.
    9 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer • Maven Default Skin • Maven Fluido Skin • Maven Application Skin • Maven Classic Skin • Maven Stylus Skin
  • 10.
    10 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer • maven-archetype-j2ee-simple • maven-archetype-plugin • maven-archetype-quickstart • ...
  • 11.
    11 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer • aka Eclipse Aether (2016) http://incubator.apache.org/ip- clearance/maven-aether.html
  • 12.
    12 Apache Maven Ecosystem MavenPlugins (~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer
  • 13.
    13 Maven Ecosystem Maven Plugins(~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer Plexus Components (~13) MojoHaus Plugins (~80) • https://github.com/codehaus-plexus https://github.com/codehaus-plexus ● plexus-classworlds ● plexus-modello ● plexus-utils ● plexus-archiver ● plexus-io ● plexus-languages ● Plexus-interpolation ...
  • 14.
    14 Maven Ecosystem Maven Plugins(~50) Maven Core Core ITs Artifact Resolver Maven Shared Components (~25) Doxia Skins Parent POMs Archetypes Indexer Plexus Components (~13) MojoHaus Plugins (~80) • https://github.com/mojohaus/ https://github.com/mojohaus/ ● mrm-maven-plugin ● versions-maven-plugin ● build-helper-maven-plugin ● buildnumber-maven-plugin ● animal-sniffer-maven-plugin ● appassembler-maven-plugin ● jaxb2-maven-plugin ● flatten-maven-plugin ● exec-maven-plugin ● rpm-maven-plugin ● templating-maven-plugin ● ...
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
    19 Consumer / BuildPOM POM V4 ● Maven 1 started with the story modelVersion 3.0.0 ● Maven 2/3 has continued the story with modelVersion 4.0.0 <project ...> <modelVersion>4.0.0</modelVersion> … </project>
  • 20.
    20 Consumer / BuildPOM POM V4 ● The pom declarares the following information: ● dependencies, dependencyManagement ● plugins, pluginManagement ● profiles, repositories ● build, reporting ● distributionManagement ● etc.
  • 21.
    21 Consumer / BuildPOM POM V4 ● The function of a POM: 1.Serves as declarative description of the build process for a project. 2.Serves as a description of the project dependency graph.
  • 22.
    22 Consumer / BuildPOM POM V4 ● Changing the POM format? – The POM is consumed by: ● Apache BuildR, Gradle, Apache Ivy, sbt ● by IDE's ● and many other tools – as a description of dependencies.
  • 23.
    23 Consumer / BuildPOM POM V4 ● Requirements to change the POM format: – All tools would needed to be changed. – We have to fork fork Central Repository.
  • 24.
    24 Consumer / BuildPOM POM V4 ● Requirements to change the POM format: – All tools would needed to be changed. – We have to fork fork Central Repository.
  • 25.
    25 Consumer / BuildPOM POM V4+ Build Information POM V4+ POM V4 Consumer POM Central Repository Build POM Project Dependency Tree (PDT)
  • 26.
    26 Consumer / BuildPOM POM V4 ● POM V4 a.k.a. Consumer POM Consumer POM – Contains only dependencies (+ dependencyManagement) – Remove all properties / build / modules / parent / …. – See flatten-maven-plugin ● https://cwiki.apache.org/confluence/display/MAVEN/Build+vs+Consumer+POM
  • 27.
    28 POM V4+ →Maven 4.X ● Core must be able to read: – POM V4 – POM V4+ ● Core must be able to produce POM V4 ● https://cwiki.apache.org/confluence/display/MAVEN/Build+vs+Consumer+POM
  • 28.
    29 Improvements / News ● Maven3.9.X (3.9.0...3.9.9 in 2024) – Bug fixing and improvements – Moved away from Wagon to Maven Resolver (aka native HTTP). – Plugin API changes with some hints as preparation for Maven 4.X You might have seen some of them! ● „-Dmaven.plugin.validation=verbose“ ● https://maven.apache.org/docs/history.html ● https://maven.apache.org/guides/mini/guide-resolver-transport.html
  • 29.
    30 Improvements / News ● Maven3.9.X (3.9.0...3.9.9 in 2024) – Since Maven 2 ancient version of plexus-utils was injected. Not done anymore (might break something!). – No bootstrap of RepositorySystem (via deprecated ServiceLocator!) – Support for „mvn pluginPrefix:version:goal” invocation https://maven.apache.org/docs/history.html
  • 30.
    31 Improvements / News ● Maven3.9.X (3.9.0...3.9.9 in 2024) – Removed some deps for example commons-lang (some kind of diet ;-)) https://maven.apache.org/docs/history.html
  • 31.
    32 Improvements / News ● Maven3.9.2+ – Use the Force Luke: – Create an „.mvn“ directory. – New properties (only from .mvn/maven.config or CL): ● session.topDirectory – reactor top ● session.rootDirectory – project root (where „.mvn“ required!). https://maven.apache.org/docs/3.9.2/release-notes.html
  • 32.
    33 Improvements / News ● Maven4 – 4.0.0-alpha-7 (Jun 2023) – Build/Consumer POM – A lot of reactor improvements – Plugin API Changes ● Some of them are breaking changes! See 3.9.X – Identifiy root location of multi module build („.mvn/“ or POM configuration). https://cwiki.apache.org/confluence/display/MAVEN/Build+vs+Consumer+POM
  • 33.
    34 Improvements / News ● Maven4 – 4.0.0-alpha-8 (20. Oct 2023) – Switch to Woodstox XML – Introduce Model Version 4.1.0 ● „root“ element in version 4.1.0 – Glob Pattern for exclusions <excludes> <exclude> <groupId>com.jdom.*</groupId> <artifactId>*</artifactId> </exclude> </excludes>
  • 34.
    35 Improvements / News ● Maven4 – 4.0.0-alpha-8 (20. Oct 2023) – „BOM“ Packaging, Trim down consumer POM – Core Extension in .m2 – Alternate POM Syntax possible ● MNG-7836 https://maven.apache.org/docs/4.0.0-alpha-8/release-notes.html
  • 35.
    36 Improvements / News ● Maven4 – 4.0.0-alpha-8 (20. Oct 2023) – POM Goal Ordering (MNG-7804, Model 4.1.0): <execution> <id>400. This should be fourth</id> <goals> <goal>run</goal> </goals> <phase>clean</phase> <priority>400</priority> </execution>
  • 36.
    37 Improvements / News ● Maven4 – 4.0.0-alpha-8 (20. Oct 2023) – Support configuration in extensions.xml (MNG-7891) (basic). – support for exclusions when importing BOMs
  • 37.
    38 Improvements / News ● Maven4 – 4.0.0-alpha-10 (11.Dec 2023) – Fixed broken javadoc:jar – Resolver fixes. https://maven.apache.org/docs/4.0.0-alpha-10/release-notes.html
  • 38.
    39 Improvements / News ● Maven4 – 4.0.0-alpha-12 (12.Jan 2024) – Resolver 2.0.0-alpha-6 – Collection filtering – Resolvers transitive dependency manager. – No resolving of projects outside the reactor. https://maven.apache.org/docs/4.0.0-alpha-12/release-notes.html
  • 39.
    40 Improvements / News ● Maven4 – 4.0.0-alpha-13 (6. Mar 2024) – JDK 17+ – Resolver 2.0.0-alpha-8. – WARN on BOM import in the same reactor. – Profile activation based on packaging. – Conflict deps vs. depMgmt. (WARN!)
  • 40.
    41 Improvements / News ● Maven4 – 4.0.0-beta-3 (22. May 2024) – Control path where each dep can be placed; module-path, classpath, doclet ● <type>jar</type> – CLASSES and MODULES. ● <type>modular-jar</type> – MODULES only. ● <type>classpath-jar</type> – CLASSES only.
  • 41.
    42 Improvements / News ● Maven4 – 4.0.0-beta-3 (22. May 2024) – <type>fatjar</type> ● self contained jar; stops resolving dependencies – Same repo Id’s settings.xml vs. pom.xml not detected.
  • 42.
    43 Improvements / News ● Maven4 – 4.0.0-beta-4 (02. Sept 2024) – New Phases: before:X, after:X ● (before:|after:)$phase([$priority]) – For example: ● before:package, before:integration-test after:integration-test, after:package, before:all, after:all etc. https://cwiki.apache.org/confluence/display/MAVEN/Dynamic+phases
  • 43.
    44 Improvements / News ● BasicIdea to have only: – A Life Cycle phase for example: ● clean – And there is a „before:clean“ and „after:clean“. – Instead of „pre-clean“, „post-clean“..
  • 44.
    45 Improvements / News CurrentTranisational Future pre-clean deprecated before:clean clean clean post-clean deprecated after:clean
  • 45.
    46 Improvements / News CurrentTranisational Future generate-sources deprecated before:sources ????? sources process-sources deprecated after:sources generate-resources deprecated before:resources ????? resources process-resources deprecated after:resources ????? before:compile compile compile process-classes deprecated after:compile
  • 46.
    47 Improvements / News CurrentTranisational Future generate-test-sources deprecated before:test-sources ????? test-sources process-test-sources deprecated after:test-sources generate-test-resources deprecated before:test-resources ????? test-resources process-test-resources deprecated after:test-resources ????? before:test-compile test-compile test-compile process-test-classes deprecated after:test-compile
  • 47.
    48 Improvements / News CurrentTranisational Future ????? deprecated before:test test test ????? after:test prepare-package deprecated before:package package package ????? after:package
  • 48.
    49 Improvements / News CurrentTranisational Future pre-integration-test deprecated before:integration-test integration-test integration-test post-integration-test deprecated after:integration-test
  • 49.
    50 Improvements / News CurrentTranisational Future before:verify verify verify after:verify before:install install install after:install before:deploy deploy deploy after:deploy
  • 50.
    51 Improvements / News CurrentTranisational Future pre-site deprecated before:site site site post-site deprecated after:site before:site-deploy site-deploy site-deploy after:site-deploy
  • 51.
    52 Improvements / News ● Maven4 – 4.0.0-beta-4 (02. Sept 2024) – Model Version 4.1.0 ● Deprecated „<modules>..</modules>“ also the term „multi module project“ ● So now we have „multi-project“ setup. ● Use „<subprojects><subproject>..</subpr oject></subprojects>“ instead.
  • 52.
    53 Current working…. ● Maven 4– 4.0.0-beta-5 (????) – New CLI component for reuse (for example in mvnd – New CLI for password management – Interpolation Service API – …
  • 53.
    54 Minimum JDK Runtime Requirements ● ... ● JDK6: Maven 3.2.X...3.2.5 ● JDK 7: Maven 3.3.X…3.8.8 ● JDK 8: Maven 3.9.0...3.9.8 ● JDK 8: ….Maven 4.0.0-alpha-12 (BT: 11) ● JDK 17: Maven 4.0.0-alpha-13…. https://maven.apache.org/docs/history.html
  • 54.
    55 Minimum JDK Runtime Requirements ● Maven4.0.0-alpha-13+ (12. March 2024) – Runtime requirement: JDK 17+ – Buildtime requirement: JDK17+ https://lists.apache.org/thread/bfkvvjftrxypp06yj8zj919fcz0dt2zt
  • 55.
    56 Maven 4.0.0+ -Plugins ● The following plugins: ● maven-clean-plugin ● maven-compiler-plugin ● maven-deploy-plugin ● maven-install-plugin ● maven-jar-plugin ● maven-resources-plugin ● Maven-source-plugin – Version 4.0.0-beta-1 (Maven 4 only!)
  • 56.
    57 Performance ● Maven Cache Extension –Incremental builds works on the modified part of the project graph part only – Subtree support for multimodule projects to work on the part of the codebase in isolation – Version normalization to support project version agnostic caches – Project state restoration (partial) to avoid expensive tasks (code generation and similar) https://maven.apache.org/extensions/maven-build-cache-extension/
  • 57.