Maven 3 New Features slide 0

Maven 3 New Features

  • Published on
    29-Aug-2014

  • View
    1.855

  • Download
    2

DESCRIPTION

berblick ber neue Features von Maven 3.

Transcript

Stefan ScheidtSolution ArchitectOPITZ CONSULTING GmbHMaven 3 New Features Wer bin ich?Software-Entwickler und ArchitektTrainer und CoachAutor und Sprecher Wer ist OPITZ CONSULTING?Last Minute:Offizieller OC 1 SeiterVon TomIhr Projektspezialist fr Java, SOA und Oracle Wer sind Sie? ber diesen Vortrag... Was ist Maven?Ein deklarativesBuild-SystemConvention overConfigurationWiederverwendung durch PluginsDependency ManagementEin Tool fr technisches Projekt-Reportingein Software Project Management Tool Was ist Maven?Ein Open-Source-Projekt bei ApacheZiel:Vereinheitlichen vonBuild, Verteilung, Projekt-WebseiteZweck:Dontrepeatyourself!Siehe auch http://maven.apache.org/what-is-maven.html Release-Historie 1.0 Beta2003 1.02004 / Juli 2.0 Alpha2005 / April 2.0 Beta2005 / September 2.02005 / Oktober 3.0 Alpha2009 / Februar 3.0 Beta 2010 / April3.02010 / OktoberQuelle: http://archive.apache.org/dist/maven/binaries/ Primre Ziele fr Maven 3.0Refactoring der Code BaseInterne Modularisierung ModularisierungQuelle:http://maven.apache.org/ref/3.0/ Primres AnliegenBackwardCompatibilityDafr viele IntegrationstestsSiehehttps://grid.sonatype.org/ci/view/Maven/job/maven-3.0.x-ITs/ Compatibility Noteshttps://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.htmlNo moreprofiles.xmlSupport forprofilesoutside of the POMorthesettings.xml has beenremovedAdvise: moveaffectedprofilesintosettings.xml(Hint: mvn--settingssome/settings/file.xml) Compatibility NotesStricter POM ValidationMore ErrorsMoreWarningsExplanationsbased on ExceptionsLinks to MavenWikihttps://cwiki.apache.org/confluence/display/MAVEN/Errors+and+Solutions Compatibility NotesDependency Resolution fromLocalRepositorybuildscanonlyaccesslocallycachedartifactsiftheyhavethe proper repositoriesconfigured(Maven 3 keepstrack of artifactorigin) Einschub: AetherA libraryforinteractingwithartifactrepositoriesLocal / RemoteRepositoriesWorkspacesTransportArtifact Resolution Einschub: Maven benutzt Aether Einschub: Aether ZieleWewant to ensurethatprojectsbuildingwith SBT, Leinigen, Gradle, Buildr, Ant,or a homegrownsysteminteroperatereliablywithMavenrepositories.Jason van Zyl, Aetherquestionsansweredfor JAX Compatibility NotesClassPathIssuesMaven 3 usingAethercanresult in different classpathsWarning: mvndependency:treestill useslegacyresolutioncode!(Hint: usemvn--debug) Compatibility NotesPluginRepositoriesBuildextensions, plugins and plugindependenciesareonlyresolvedfrom(and no longerfrom) Compatibility NotesPlugin Version Resolutionautomaticpluginversionresolutionisscheduledfor removalTill then: latestreleaseversionisused,notlatestsnapshotversion Compatibility NotesSnapshotDeploymentssnapshotartifacts will alwaysbedeployedusing a timestampedversion(false has no effect) Compatibility NotesSite GenerationAll reportingrelatedcodehas beenremovedfromMavencoreThereforeonemustuseMaven Site Plugin 3.xSiehe https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html Compatibility NotesConfiguration of reportingpluginspluginconfiguration in no longeraffectsplugins in (whenexecuting a pluginduringbuildlifecycleorfromcli,onlyconfigurationfromisconsidered) PluginCompatibilityPluginCompatibility Matrixhttps://cwiki.apache.org/MAVEN/maven-3x-plugin-compatibility-matrix.htmlReporting PluginsCompatibility Matrixhttps://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html Maven Shellhttp://shell.sonatype.org/https://docs.sonatype.org/display/MVNSH/HomeCLI forMavenstandalone Java processkeepsPOMs in memoryforfasterbuildsreplacesmaven-cli-plugin Performance Performance: Parallel buildshttps://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3Experimental Feature since 3.0 Beta 1mvn -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 core20-50% speedimprovementisquitecommonDepends on distribution of tests Maven 3 und IDEsMajor Java IDEs allreadyinclude(someversion of) Maven 3Eclipse via m2eclipse, IntelliJ, NetBeansStill no supportby Oracle JDeveloper Maven 3 und CI-SystemeHudsonNo supportforMaven 3 yet, voteforhttp://issues.hudson-ci.org/browse/HUDSON-4988WorkAround: Free Style ProjectsShell Command:export M2_HOME=/path/to/apache-maven-3.0-beta-3export M2=$M2_HOME/binexport PATH=$M2:$PATHcd someprojectmvn clean install Maven 3 und CI-SystemeTeamcityNo Support in Teamcity 5Support announcedfor Teamcity 6 Maven 3 und SonarSonar 2.2 supportsMaven 3Butyouneed 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/ PolyglotMavenhttp://polyglot.sonatype.org/ Ausblickem2eclipse will move to eclipse.orgRelease of m2eclipse 1.0 soonRelease of mvnsh fairlysoonnewphase of work on PolyglotMavenOSGiruntime in futurerelease Ausblicke: Maven 3.1POM format 4.1Global excludesVersionlessparentelementsMixinsNew settingssystemNew Plugin API Ausblicke - Quellenhttp://java.profict.nl/presentaties/maven.pdfhttp://www.sonatype.com/people/2010/10/maven-3-0-has-landed/http://www.infoq.com/news/2010/10/maven-30-releasedSiehe auchhttps://sonatype.webex.com/sonatype/lsr.php?AT=pb&SP=EC&rID=46805542&rKey=3f773d348b2df17b FazitWeseethis as a newbeginningforMavenJason van Zyl Fragen und Antworten KontaktStefan ScheidtSolution ArchitectOPITZ CONSULTING GmbHKirchstr. 6, 51647 GummersbachTel. +49 (2261) 6001 - 0stefan.scheidt@opitz-consulting.com

Recommended

View more >