Stefan Scheidt<br />Solution Architect<br />OPITZ CONSULTING GmbH<br />Maven 3 New Features<br />
Wer bin ich?<br />Software-Entwickler und Architekt<br />Trainer und Coach<br />Autor und Sprecher<br />
Wer ist OPITZ CONSULTING?<br />Last Minute:<br />Offizieller OC 1 Seiter<br />Von Tom<br />Ihr Projektspezialist für Java,...
Wer sind Sie?<br />
Über diesen Vortrag...<br />
Was ist Maven?<br />Ein deklarativesBuild-System<br />Convention overConfiguration<br />Wiederverwendung durch Plugins<br ...
Was ist Maven?<br />Ein Open-Source-Projekt bei Apache<br />Ziel:<br />Vereinheitlichen von<br />Build, Verteilung, Projek...
Release-Historie<br />	 		1.0 Beta		2003<br />		 	1.0			2004 / Juli<br />		 	2.0 Alpha		2005 / April<br />		 	2.0 Beta		20...
Primäre Ziele für Maven 3.0<br />Refactoring der Code Base<br />Interne Modularisierung<br />
Modularisierung<br />Quelle:<br />http://maven.apache.org/ref/3.0/<br />
Primäres Anliegen<br />BackwardCompatibility<br />Dafür viele Integrationstests<br />Siehehttps://grid.sonatype.org/ci/vie...
Compatibility Notes<br />https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html<br />No moreprofiles.xml<br />Su...
Compatibility Notes<br />Stricter POM Validation<br />More Errors<br />MoreWarnings<br />Explanationsbased on Exceptions<b...
Compatibility Notes<br />Dependency Resolution fromLocalRepository<br />buildscanonlyaccesslocallycachedartifacts<br />ift...
Einschub: Aether<br />A libraryforinteractingwith<br />artifactrepositories<br />Local / RemoteRepositories<br />Workspace...
Einschub: Maven benutzt Aether<br />
Einschub: Aether – Ziele<br />„Wewant to ensurethatprojectsbuilding<br />with SBT, Leinigen, Gradle, Buildr, Ant,<br />or ...
Compatibility Notes<br />ClassPathIssues<br />Maven 3 usingAether<br />canresult in different classpaths<br />Warning: mvn...
Compatibility Notes<br />PluginRepositories<br />Buildextensions, plugins and plugindependenciesareonlyresolvedfrom<plugin...
Compatibility Notes<br />Plugin Version Resolution<br />automaticpluginversionresolution<br />isscheduledfor removal<br />...
Compatibility Notes<br />SnapshotDeployments<br />snapshotartifacts will alwaysbedeployed<br />using a timestampedversion<...
Compatibility Notes<br />Site Generation<br />All reportingrelatedcode<br />has beenremovedfromMavencore<br />Thereforeone...
Compatibility Notes<br />Configuration of reportingplugins<br />pluginconfiguration in <reporting><br />no longeraffectspl...
PluginCompatibility<br />PluginCompatibility Matrix<br />https://cwiki.apache.org/MAVEN/maven-3x-plugin-compatibility-matr...
Maven Shell<br />http://shell.sonatype.org/<br />https://docs.sonatype.org/display/MVNSH/Home<br />CLI forMaven<br />stand...
Performance<br />
Performance: Parallel builds<br />https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3<br />Experi...
Maven 3 und IDEs<br />Major Java IDEs allreadyinclude<br />(someversion of) Maven 3<br />Eclipse via m2eclipse, IntelliJ, ...
Maven 3 und CI-Systeme<br />Hudson<br />No supportforMaven 3 yet, voteforhttp://issues.hudson-ci.org/browse/HUDSON-4988<br...
Maven 3 und CI-Systeme<br />Teamcity<br />No Support in Teamcity 5<br />Support announcedfor Teamcity 6<br />
Maven 3 und Sonar<br />Sonar 2.2 supportsMaven 3<br />Butyouneed to use sonar-maven3-plugin:2.2<br />(mvn org.codehaus.son...
PolyglotMaven<br />http://polyglot.sonatype.org/<br />
Ausblicke<br />m2eclipse will move to eclipse.org<br />Release of m2eclipse 1.0 „soon“<br />Release of mvnsh „fairlysoon“<...
Ausblicke: Maven 3.1<br />POM format 4.1<br />Global excludes<br />Versionlessparentelements<br />Mixins<br />New settings...
Ausblicke - Quellen<br />http://java.profict.nl/presentaties/maven.pdf<br />http://www.sonatype.com/people/↵⌫2010/10/maven...
Fazit<br />„Weseethis as a newbeginningforMaven“<br />Jason van Zyl<br />
Fragen und Antworten<br />
Kontakt<br />Stefan Scheidt<br />Solution Architect<br />OPITZ CONSULTING GmbHKirchstr. 6, 51647 GummersbachTel. +49 (2261...
Upcoming SlideShare
Loading in...5
×

Maven 3 New Features

1,619

Published on

Überblick über neue Features von Maven 3.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,619
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Maven 3 New Features"

  1. 1. Stefan Scheidt<br />Solution Architect<br />OPITZ CONSULTING GmbH<br />Maven 3 New Features<br />
  2. 2. Wer bin ich?<br />Software-Entwickler und Architekt<br />Trainer und Coach<br />Autor und Sprecher<br />
  3. 3. Wer ist OPITZ CONSULTING?<br />Last Minute:<br />Offizieller OC 1 Seiter<br />Von Tom<br />Ihr Projektspezialist für Java, SOA und Oracle<br />
  4. 4. Wer sind Sie?<br />
  5. 5. Über diesen Vortrag...<br />
  6. 6. Was ist Maven?<br />Ein deklarativesBuild-System<br />Convention overConfiguration<br />Wiederverwendung durch Plugins<br />Dependency Management<br />Ein Tool für technisches Projekt-Reporting<br />ein „Software Project Management Tool“<br />
  7. 7. Was ist Maven?<br />Ein Open-Source-Projekt bei Apache<br />Ziel:<br />Vereinheitlichen von<br />Build, Verteilung, Projekt-Webseite<br />Zweck:<br />Don‘trepeatyourself!<br />Siehe auch http://maven.apache.org/what-is-maven.html<br />
  8. 8. Release-Historie<br /> 1.0 Beta 2003<br /> 1.0 2004 / Juli<br /> 2.0 Alpha 2005 / April<br /> 2.0 Beta 2005 / September<br /> 2.0 2005 / Oktober<br /> 3.0 Alpha 2009 / Februar<br /> 3.0 Beta 2010 / April<br /> 3.0 2010 / Oktober<br />Quelle: http://archive.apache.org/dist/maven/binaries/<br />
  9. 9. Primäre Ziele für Maven 3.0<br />Refactoring der Code Base<br />Interne Modularisierung<br />
  10. 10. Modularisierung<br />Quelle:<br />http://maven.apache.org/ref/3.0/<br />
  11. 11. Primäres Anliegen<br />BackwardCompatibility<br />Dafür viele Integrationstests<br />Siehehttps://grid.sonatype.org/ci/view/Maven/job/maven-3.0.x-ITs/<br />
  12. 12. Compatibility Notes<br />https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html<br />No moreprofiles.xml<br />Support forprofilesoutside of the POM<br />orthesettings.xml has beenremoved<br />Advise: moveaffectedprofilesintosettings.xml<br />(Hint: mvn--settingssome/settings/file.xml)<br />
  13. 13. Compatibility Notes<br />Stricter POM Validation<br />More Errors<br />MoreWarnings<br />Explanationsbased on Exceptions<br />Links to MavenWiki<br />https://cwiki.apache.org/confluence/display/MAVEN/Errors+and+Solutions<br />
  14. 14. Compatibility Notes<br />Dependency Resolution fromLocalRepository<br />buildscanonlyaccesslocallycachedartifacts<br />iftheyhavethe proper repositoriesconfigured<br />(Maven 3 keepstrack of artifactorigin)<br />
  15. 15. Einschub: Aether<br />A libraryforinteractingwith<br />artifactrepositories<br />Local / RemoteRepositories<br />Workspaces<br />Transport<br />Artifact Resolution<br />
  16. 16. Einschub: Maven benutzt Aether<br />
  17. 17. Einschub: Aether – Ziele<br />„Wewant to ensurethatprojectsbuilding<br />with SBT, Leinigen, Gradle, Buildr, Ant,<br />or a homegrownsysteminteroperate<br />reliablywithMavenrepositories.“<br />Jason van Zyl, Aetherquestionsansweredfor JAX<br />
  18. 18. Compatibility Notes<br />ClassPathIssues<br />Maven 3 usingAether<br />canresult in different classpaths<br />Warning: mvndependency:tree<br />still useslegacyresolutioncode!<br />(Hint: usemvn--debug)<br />
  19. 19. Compatibility Notes<br />PluginRepositories<br />Buildextensions, plugins and plugindependenciesareonlyresolvedfrom<pluginRepositories><br />(and no longerfrom<repositories>)<br />
  20. 20. Compatibility Notes<br />Plugin Version Resolution<br />automaticpluginversionresolution<br />isscheduledfor removal<br />Till then: latestreleaseversionisused,<br />notlatestsnapshotversion<br />
  21. 21. Compatibility Notes<br />SnapshotDeployments<br />snapshotartifacts will alwaysbedeployed<br />using a timestampedversion<br />(<uniqueVersion>false</uniqueVersion> has no effect)<br />
  22. 22. Compatibility Notes<br />Site Generation<br />All reportingrelatedcode<br />has beenremovedfromMavencore<br />ThereforeonemustuseMaven Site Plugin 3.x<br />Siehe https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html<br />
  23. 23. Compatibility Notes<br />Configuration of reportingplugins<br />pluginconfiguration in <reporting><br />no longeraffectsplugins in <build><br />(whenexecuting a pluginduringbuildlifecycleorfromcli,<br />onlyconfigurationfrom<build>isconsidered)<br />
  24. 24. PluginCompatibility<br />PluginCompatibility Matrix<br />https://cwiki.apache.org/MAVEN/maven-3x-plugin-compatibility-matrix.html<br />Reporting PluginsCompatibility Matrix<br />https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html<br />
  25. 25. Maven Shell<br />http://shell.sonatype.org/<br />https://docs.sonatype.org/display/MVNSH/Home<br />CLI forMaven<br />standalone Java process<br />keepsPOMs in memoryforfasterbuilds<br />replacesmaven-cli-plugin<br />
  26. 26. Performance<br />
  27. 27. Performance: Parallel builds<br />https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3<br />Experimental Feature since 3.0 Beta 1<br />mvn -T 4 clean install # Buildswith 4 threads
 mvn -T 1C clean install # 1 thread per cpucore
 mvn -T 1.5C clean install # 1.5 thread per core<br />„20-50% speedimprovementisquitecommon“<br />Depends on distribution of tests<br />
  28. 28. Maven 3 und IDEs<br />Major Java IDEs allreadyinclude<br />(someversion of) Maven 3<br />Eclipse via m2eclipse, IntelliJ, NetBeans<br />Still no supportby Oracle JDeveloper<br />
  29. 29. Maven 3 und CI-Systeme<br />Hudson<br />No supportforMaven 3 yet, voteforhttp://issues.hudson-ci.org/browse/HUDSON-4988<br />WorkAround: Free Style Projects<br />Shell Command:<br />export M2_HOME=/path/to/apache-maven-3.0-beta-3<br />export M2=$M2_HOME/bin<br />export PATH=$M2:$PATH<br /> cd someproject<br />mvn clean install<br />
  30. 30. Maven 3 und CI-Systeme<br />Teamcity<br />No Support in Teamcity 5<br />Support announcedfor Teamcity 6<br />
  31. 31. Maven 3 und Sonar<br />Sonar 2.2 supportsMaven 3<br />Butyouneed to use sonar-maven3-plugin:2.2<br />(mvn org.codehaus.sonar:sonar-maven3-plugin:2.2:sonar)<br />Siehe http://www.sonatype.com/people/2010/08/maven-3-and-sonar/<br />
  32. 32. PolyglotMaven<br />http://polyglot.sonatype.org/<br />
  33. 33. Ausblicke<br />m2eclipse will move to eclipse.org<br />Release of m2eclipse 1.0 „soon“<br />Release of mvnsh „fairlysoon“<br />newphase of work on PolyglotMaven<br />OSGiruntime in futurerelease<br />
  34. 34. Ausblicke: Maven 3.1<br />POM format 4.1<br />Global excludes<br />Versionlessparentelements<br />Mixins<br />New settingssystem<br />New Plugin API<br />
  35. 35. Ausblicke - Quellen<br />http://java.profict.nl/presentaties/maven.pdf<br />http://www.sonatype.com/people/↵⌫2010/10/maven-3-0-has-landed/<br />http://www.infoq.com/news/2010/10/↵⌫maven-30-released<br />Siehe auch<br />https://sonatype.webex.com/sonatype/lsr.php?↵⌫<br />AT=pb&SP=EC&rID=46805542&rKey=3f773d348b2df17b<br />
  36. 36. Fazit<br />„Weseethis as a newbeginningforMaven“<br />Jason van Zyl<br />
  37. 37. Fragen und Antworten<br />
  38. 38. Kontakt<br />Stefan Scheidt<br />Solution Architect<br />OPITZ CONSULTING GmbHKirchstr. 6, 51647 GummersbachTel. +49 (2261) 6001 - 0stefan.scheidt@opitz-consulting.com<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×