Maven 3 New Features
Upcoming SlideShare
Loading in...5
×
 

Maven 3 New Features

on

  • 1,863 views

Überblick über neue Features von Maven 3.

Überblick über neue Features von Maven 3.

Statistics

Views

Total Views
1,863
Views on SlideShare
1,863
Embed Views
0

Actions

Likes
1
Downloads
22
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Maven 3 New Features Maven 3 New Features Presentation Transcript

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