Java User Group Cologne
-
Upload
software-entwicklung-beratung-schulung -
Category
Technology
-
view
412 -
download
0
Transcript of Java User Group Cologne
Blog: blog.soebes.de
Twitter: @khmarbaise
Email: [email protected] Dipl.Ing.(FH) Karl Heinz Marbaise
Advanced MavenDevelopment and the Roadmap of Maven
www.soebes.com 2
About me
● build and confguration management, software developer, trainerJava(EE), TestNG, Mockito, Jenkins, Git, Subversion, Maven, Nexus, NinjaFramework
● Apache Maven PMC Member, MojoHaus Member, Codehaus-Plexus Member, RisingOak Member
https://maven.apache.org/team-list.htmlhttps://github.com/mojohaushttps://github.com/codehaus-plexushttps://github.com/RisingOak/
www.soebes.com 3
● History● Maven – Ecosystem● Maven – Roadmap● Plugin – Roadmap● Build Performance / Extensions● Q&A
Agenda
www.soebes.com 5
● Maven 1.X.X – R.I.P. 2004-07-13● Maven 2.0.X – R.I.P. 2005-10-20● Maven 2.1.X – R.I.P. 2009-03-22● Maven 2.2.X – R.I.P. (EoL 2014-02-18)
http://maven.apache.org/maven-2.x-eol.html
History
http://maven.apache.org/docs/history.html
www.soebes.com 6
● Maven 3.0.X– Maven 3.0 2010-10-08– Maven 3.0.1 2010-11-26– Maven 3.0.2 2011-01-12– Maven 3.0.3 2011-03-04– Maven 3.0.4 2012-01-20– Maven 3.0.5 2013-02-23
● End of Live: Not Yet but...?End of Live: Not Yet but...?
History
http://maven.apache.org/docs/history.html
www.soebes.com 7
● Maven 3.1.X– Maven 3.1.0 2013-07-15– Maven 3.1.1 2013-10-04
History
http://maven.apache.org/docs/history.html
www.soebes.com 8
● Maven 3.2.X– Maven 3.2.1 2014-02-21– Maven 3.2.2 2014-06-26– Maven 3.2.3 2014-08-17– Maven 3.2.5 2014-12-20
History
http://maven.apache.org/docs/history.html
www.soebes.com 9
● Maven 3.3.X– Maven 3.3.1 2015-03-18– Maven 3.3.3 2015-04-28– Maven 3.3.9 2015-11-14
History
http://maven.apache.org/docs/history.html
www.soebes.com 11
● Apache Maven (Core)● Apache Maven Plugins (49)● Apache Shared Components (27)● Apache POM Parents (ASF, Maven
Plugins, Maven Shared)
http://maven.apache.org/ref/current/http://maven.apache.org/plugins/http://maven.apache.org/shared/http://maven.apache.org/pom/
Maven Ecosystem Overview - Apache
www.soebes.com 12
● Apache Maven SCM, Wagon, Maven Ant Tasks, Maven Archetype, Maven Doxia, Maven JXR, Maven Plugin Testing, Maven Plugin Tools, Skins, …
http://maven.apache.org/jxr/http://maven.apache.org/archetype/http://maven.apache.org/doxia/http://maven.apache.org/wagon/http://maven.apache.org/scm/http://maven.apache.org/plugin-testing/http://maven.apache.org/plugin-tools/http://maven.apache.org/skins/
Maven Ecosystem Overview - Apache
www.soebes.com 13
● MojoHaus (formerly CodeHaus 2015-05-31):
appassembler-maven-plugin, animal-snifer-maven-plugin, buildnumber-maven-plugin, build-helper-maven-plugin, clirr-maven-plugin, cobertura-maven-plugin, exec-maven-plugin, extra-enforcer-rules, fndbugs-maven-plugin, fatten-maven-plugin, sql-maven-plugin, versions-maven-plugin, rpm-maven-plugin, xml-maven-plugin, properties-maven-plugin, templating-maven-plugin,...
http://www.mojohaus.orghttps://github.com/mojohaus
Maven Ecosystem Overview
www.soebes.com 14
● Codehaus-plexus (formerly CodeHaus 2015-05-31):
– plexus-compiler, modello, plexus-interpolation, plexus-utils, plexus-archiver, plexus-io, ... etc.
https://codehaus-plexus.github.io/https://github.com/codehaus-plexus
Maven Ecosystem Overview
www.soebes.com 15
● Eclipse Aether
– Transportation of artifacts from/to repositories.
http://eclipse.org/aether/
Maven Ecosystem Overview
www.soebes.com 17
● Maven 3.X Versioning– Versions can have more than three
parts (major.minor.patch....).
1.0.10.0.0-SNAPSHOT,1.0.9.10.0-SNAPSHOT
● https://maven.apache.org/ref/3.0.3/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.htmlhttps://cwiki.apache.org/confuence/display/MAVENOLD/Versioning
Roadmap Maven 3.X
www.soebes.com 18
● Maven 3.1.X
Allow the use of JSR330 annotation in Maven extensions and plugins
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922&version=12330182http://maven.apache.org/maven-jsr330.html
Roadmap Maven 3.X
www.soebes.com 19
● Maven 3.2.1Transitive Dependency excludes
<dependency> <groupId>net.sourceforge.jwebunit</groupId> <artifactId>jwebunit-core</artifactId> <version>3.2</version> <exclusions> <exclusion> <artifactId>*</artifactId> <groupId>*</groupId> </exclusion> </exclusions> </dependency>
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922&version=12330185
Roadmap Maven 3.X
www.soebes.com 20
● Maven 3.2.1– Reactor Changes
● Plugable Reactor makes it possible to implement new behaviour for multi-module projects.
– Enhancment of AbstractMavenLifecycleParticipant
https://issues.apache.org/jira/browse/MNG-5578 https://issues.apache.org/jira/browse/MNG-5557
https://issues.apache.org/jira/browse/MNG-5582 https://issues.apache.org/jira/browse/MNG-5230
https://issues.apache.org/jira/browse/MNG-5575 https://issues.apache.org/jira/browse/MNG-5389
Roadmap Maven 3.X
www.soebes.com 21
● Maven 3.2.1– Continious delivery friendly versions
${revision}, ${sha1}, ${changelist} could be used as version values instead of literal values.
https://issues.apache.org/jira/browse/MNG-5576
Roadmap Maven 3.X
www.soebes.com 22
● Maven 3.2.2Support version ranges in parent elements.
<project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache</groupId> <artifactId>apache</artifactId> <version>[3.0,4.0)</version> </parent> <groupId>org.apache.maven.its.mng2199</groupId> <artifactId>valid</artifactId> <version>1</version> <packaging>pom</packaging></project>
https://issues.apache.org/jira/browse/MNG-2199
Roadmap Maven 3.X
www.soebes.com 23
● Maven 3.2.3– Maven Central Access via https://
https://issues.apache.org/jira/browse/MNG-5672
Roadmap Maven 3.X
www.soebes.com 24
● Maven 3.2.5– Provide a tool to show Maven version
comparison.
java -jar ./maven/lib/maven-artifact-3.2.5.jar \ 1.0.10.0-SNAPSHOT 1.0.1.0-SNAPSHOT
Display parameters as parsed by Maven (in canonical form) and comparison result:1. 1.0.10.0-SNAPSHOT == 1.0.10-snapshot 1.0.10.0-SNAPSHOT > 1.0.1.0-SNAPSHOT2. 1.0.1.0-SNAPSHOT == 1.0.1-snapshot
https://issues.apache.org/jira/browse/MNG-5730
Roadmap Maven 3.X
www.soebes.com 25
● Maven 3.3.1– Java 1.7– Toolchain mechanism improved– Core Extension mechanism improved
.mvn/extensions.xml (see examples).– Maven options via .mvn/maven.confg– JVM Options via .mvn/jvm.confg– Calling plugin goals from CLI with
diferent confgurations.https://issues.apache.org/jira/browse/MNG-5767 https://issues.apache.org/jira/browse/MNG-5768
https://issues.apache.org/jira/browse/MNG-5771 https://issues.apache.org/jira/browse/MNG-5780
Roadmap Maven 3.X
www.soebes.com 26
● Maven 3.3.3– Maven extensions can not be retrieved
from authenticated repositories
https://issues.apache.org/jira/browse/MNG-5795
Roadmap Maven 3.X
www.soebes.com 27
● Maven 3.3.9– Removed par life cycle– maven-ejb3-plugin has been removed
from default bindings.
https://issues.apache.org/jira/browse/MNG-5892
https://issues.apache.org/jira/browse/MNG-5894
Roadmap Maven 3.X
www.soebes.com 28
● Maven 3.4.X Line– current development– No Ant Bootstrap support anymore
(Bootstrap only via Maven itself).– For details see the issue tracker.
Issues for Maven 3.4.0
Roadmap Maven 3.4.X
www.soebes.com 29
● Name in line with Model Version (currently 4.0.0) which might be changed to 5.0.0
– Removing parts from pom.xml● Repositories, distributionManagement ?
● Change the format?
Roadmap Maven 5.X
www.soebes.com 30
● A proper place at the beginning and end of the build to execute.
– We should think of a smarter lifecycle-mechanism
● Remove Ant Mojos, Beanshell● Remove scope=system● Remove LegacySupport● Checksum policy to fail by default.
Roadmap Maven 5.X
www.soebes.com 31
● Remove automatic plugin version selection (MNG-4173).
● Remove dynamic dependency addition (cobertura-plugin?)
● Get rid of aggregator plugins● Remove maven-compat and update our
plugins not to use it (currently in tests they are using it).
Roadmap Maven 5.X
www.soebes.com 34
● Upgrade all Plugins ● Maven 2.2.1 minimum● JDK 5 Minimum
● Intention was to get a clean baseline for all plugins.
Plugin Roadmap
www.soebes.com 36
● Upgrade all Plugins ● Maven 3.0 minimum (drop Maven 2.X
compatibility).● JDK 6 Minimum
● This results in many code cleanup's (under going).
● First step is having all shared components to be updated frst (done so far).
Plugin Roadmap
www.soebes.com 38
Roadmap Maven JDK 9?
Robert Scholte @rfscholte Feb 2@mreinhold @aheritier I've asked @wi99ert to redraw our sketches, see result /cc @hboutemy @khmarbaise @ptahchiev
www.soebes.com 40
● Build times
1. >5 minutes
2. >10 minutes
3. >30 minutes
4. > hour?
5.more?
Build Performance
www.soebes.com 42
What is the frst thing you need to do?
Measure your values !Measure your values !
Build Performance
www.soebes.com 43
● How long does your whole build take?● How long do your test take?● How long does the download of artifacts
take?● How long does the install take?● How long does the deploy take to
upload your artifacts to your repository manager ?
● Running inside CI solution?
Build Performance
www.soebes.com 45
● How to optimize the performance of your build?
– One solution could be parallelization:
mvn -T 4 clean deploy
Build Performance
www.soebes.com 46
Note: Usage of the images has been friendly permitted by Jason van Zyl (takari.io)
Build Performance
www.soebes.com 47
Note: Usage of the images has been friendly permitted by Jason van Zyl (takari.io)
Build Performance
www.soebes.com 48
● An other solution:– Takari Smart Builder
mvn clean deploy --builder smart -T4
http://takari.io/book/30-team-maven.html#takari-smart-builder
Build Performance
www.soebes.com 49
● Maven is open source.● Work happens on latest source.● Old releases don't get much attention or
support.● There does not exist a company behind
„Maven“
What is Maven?
www.soebes.com 51
● September 2015– Number of Artifacts: 1,070,944– Current Size: 1,761,203 MB
http://search.maven.org/#stats17. September 2015
Maven Central
www.soebes.com 52
● February 2016– Number of Artifacts: 1,233,127– Current Size: 2,664,131 MB
http://search.maven.org/#stats06 February 2016
Maven Central