SlideShare a Scribd company logo
1 of 35
Download to read offline
Maven 3.x: The Evolution of
Enterprise Java Build Infrastructures
     The Maven-related tooling youʼll be using in your
            infrastructure for years to come


                   Jason van Zyl
             http://twitter.com/jvanzyl
Agenda & Session Goals
What weʼre going to talk about and accomplish this session
                     2. Developer checks in source code        3. Hudson checks out the source code


                  M2Eclipse            2            Git             3         Hudson



                                                                                      4. Hudson instructs Maven to perform
                                                                                  4
                                   1                                                  the automated build
    1. Developer requests binary
    dependencies from Nexus


                                                  Nexus             5         Maven

                                                                    5. Maven deploys build
                           6a. Proviso requests                     artifacts to Nexus
                           updates to runtime
                           components                6
                                                          6b. Nexus sends component
                           from Nexus
                                                          updates to Proviso
      Maven Central++
       Maven Central
                                                                                              Agent
                                                  Proviso            7
                                                                                      Agent           Agent
                                             7. Proviso provisions components
                                             and configurations into the
                                             target runtime
Agenda & Session Goals
What weʼre going to talk about and accomplish this session




 To understand how Maven 3.x and
 its related tools & frameworks are
  going to help us get to that ideal
        delivery infrastructure
Updates on Maven, M2Eclipse & Tycho ...
Whatʼs going on at Sonatype & in Maven land?
• Maven 3.0-final has been released. Yay!
• Sonatype is planning features for what we would like to see in Maven 3.1
• M2Eclipse 1.0 will be released after two 4-6 week iterations or so.
   • Itʼs getting better rapidly because most of Sonatypeʼs Eclipse team is working on it.
   • We are moving M2Eclipse to the Eclipse Foundation
   • Weʼve started checking in the code at the Eclipse Foundation
• Tycho passed its project creation review at the Eclipse Foundation, has been
 provisioned, and will soon begin the parallel IP process
• MavenShell 1.0 will be released December 1st
• PolyglotMaven 1.0 will be released January 1st
• PDE replacement using Tycho hopefully demo-ready in a couple weeks
• We hope to submit our JSR-330 and REST work to the Hudson project soon &
 possibly working with Oracle to implement Maven 3.x support
Maven Central Unique IPs / Month [Aug2009 to Aug2010]
900,000

                                                                                                    832,749
                                                                                          787,939             789,814

                                                                                735,809                                           742,882
                                                                      712,863                                           723,822
                                                            698,823
                                                  667,708
675,000                                 646,600

                              588,141
                    557,734
          514,589


450,000
                                              Maven is the de facto component
                                        distribution infrastructure for Java projects

                                                    Maven Central is the de facto
225,000                                            store house of all Open Source
                                                Java components: ~300M hits/month



     0
            Aug       Sep       Oct       Nov       Dec       Jan       Feb       Mar       Apr       May       Jun       Jul!      Aug



                                                                                                                                   non-Maven < 0.5%
                                  2008 Total Unique IPs: 1,836,709                                                                     RM < 7%
                                  2009 Total Unique IPs: 3,978,964
                                  2010 Total Unique IPs: 6,024,701(end of Aug)
Maven 3.1
Whatʼs going on for Maven 3.1
• POM interoperability
• Maven 3.1 Plugin API (SM --> AM)
   • JSR-330
   • Java5 annotations
   • Tight integration with M2Eclipse
   • Build avoidance
• Mixins (SM --> AM)
• Versionless parents in child POMs (SM --> AM)
• Concurrent-access local repository implementation (SM)
• Async HTTP Client connector for Aether (SM)
• Async HTTP Client Wagon (SM)
• Dynamic Extension API (SM)
• Eventing API (SM)
Sonatypeʼs Maven Plan
Rapidly innovate while being reconciled to the Apache Way

                                               MavenIDE @ Github




                                                   M2Eclipse
                         MavenShell @ Github
                                                   @ Eclipse




                           Sonatype Maven
      Apache Maven                              Tycho @ Eclipse
                              @ Github




      Apache Maven                              Polyglot Maven
                          F1     F2     F3
        @ Github                                   @ Github
A Maven-focused Hudson
Sonatype is doing a lot of work with Hudson
• JSR-330-based plugins
• REST support using Apache Wink
• Global configuration management
• Apache Shiro integration for security management and SSO
• Slave tool provisioning with Proviso (based on Eclipse p2)
• Integration with M2Eclipse (Sonatype Professional)
• Maven 3.x integration (in progress)
• Long-lived workflow using Drools Flow (research)
The Idea Development Infrastructure
Now letʼs talk about some of the underlying technologies
                     2. Developer checks in source code        3. Hudson checks out the source code


                  M2Eclipse            2            Git             3         Hudson



                                                                                      4. Hudson instructs Maven to perform
                                                                                  4
                                   1                                                  the automated build
    1. Developer requests binary
    dependencies from Nexus


                                                  Nexus             5         Maven

                                                                    5. Maven deploys build
                           6a. Proviso requests                     artifacts to Nexus
                           updates to runtime
                           components                6
                                                          6b. Nexus sends component
                           from Nexus
                                                          updates to Proviso
      Maven Central++
       Maven Central
                                                                                              Agent
                                                  Proviso            7
                                                                                      Agent           Agent
                                             7. Proviso provisions components
                                             and configurations into the
                                             target runtime
The ideal Maven-focused delivery infrastructure
What does that look like?
• Shared component & plugin model
• Shared transport system
• Shared repository API
• Enriched component metadata
• Enhanced IDE connectivity to the infrastructure
• Provisioning (I think this might have to wait until the next webinar)
Shared component model
For Sonatype this means JSR-330


         M2Eclipse        Git     Hudson




                        Nexus     Maven




                                              Agent
                        Proviso

       JSR-330                        Agent           Agent
Moving from Plexus to Guice & JSR-330
Making it all work with Guice
• Requirements
   • Absolutely no code changes for any Maven, Nexus, M2Eclipse component
   • Must support Plexusʼ classpath/resource scanning
   • Must support Plexusʼ dynamic component assembly based on discovered metadata
   • Must support Plexusʼ configuration & converter mechanism
   • When we need changes made to the runtime container, we need those changes to
   be timely
  • Support for arbitrary lifecycles
  • We need the container to be wed with OSGi -- for us the answer is Peaberry
  • Component graph proxy support: for components and configuration
  • Dynamic language support
Implications of using JSR-330
We bring some sanity to tooling
• Writing plugins in various ways for tools like Maven, Nexus, Hudson, Sonar & Eclipse
 has a great deal of mental overhead. This burden will be removed.
• The implications for development, testing and delivery are huge. They cannot be
 understated
  • Common development models: how to create JSR-330-based plugins, better
   component reuse, a common understand of infrastructure tooling
  • Common testing frameworks for JSR-330 e.g Sonatypeʼs REST/UI toolkit
  • Common provisioning models
Sisu Maven Plugin Example
Using the same component model
@Goal( "webxml" )
@Phase( GENERATE_RESOURCES )
@RequiresProject
@Threadsafe
public class GenerateWebXml extends SisuMavenMojo {
    @Inject Logger logger;

    @Inject
    private Component component;

    @Inject @Named( "${project}" )
    private MavenProject project;

    @Inject @Named( "${outputDirectory}" ) @DefaultsTo( "${project.build.directory}" )
    private File outputDirectory;

    @Inject
    private List<WebXmlAugmenter> webXmlAugmenters;

    public void execute() throws Exception {
        component.generate( project, webXmlAugmenters, outputDirectory );
    }
}
Sisu Hudson Plugin Example
Using the same component model
@Named
@Singleton
public class RestPlugin
    extends Plugin
{
    @Inject
    private Logger logger;

    private transient List<ApiProvider> providers;

    private boolean enabled = true;

    @Inject
    public RestPlugin(final List<ApiProvider> providers) {
        assert providers != null;
        this.providers = providers;

        logger.debug("Providers:");
        for (ApiProvider provider : providers) {
            logger.debug( "    {}", provider );
        }
    }
}
Sisu Nexus Plugin Example
Using the same component model
@Named
@Singleton
@Path( CapabilitiesResource.RESOURCE_URI )
@Produces( { "application/xml", "application/json" } )
@Consumes( { "application/xml", "application/json" } )
public class CapabilitiesResource
    implements Resource {
    public static final String RESOURCE_URI = "/capabilities";

    private final CapabilityConfiguration capabilitiesConfiguration;

    private final CapabilityDescriptorRegistry capabilityDescriptorRegistry;

    @Inject
    public CapabilitiesResource( CapabilityConfiguration capabilitiesConfiguration,
                         CapabilityDescriptorRegistry capabilityDescriptorRegistry )
    {
        this.capabilitiesConfiguration = capabilitiesConfiguration;
        this.capabilityDescriptorRegistry = capabilityDescriptorRegistry;

        ...
    }
}
Shared transport system
For Sonatype this means the Async HTTP Client


          M2Eclipse          Git      Hudson




                           Nexus       Maven




                                                   Agent
                           Proviso
                                           Agent           Agent
       Async HTTP Client
Shared repository API
For Sonatype this means our new Aether library


          M2Eclipse         Git         Hudson




                      1




                          Nexus     5   Maven




                            6




                                                    Agent
                          Proviso   7

        Aether                              Agent           Agent
Aether
Overhauled Repository Artifact Resolution API
• The artifact resolution code has always been relatively decoupled, but Aether is a
 completely stand-alone library and has no dependencies on Maven
• SSL support
• DAV support
• Proxies
• NTLM(v2)
• Transport
   • Weʼre using the Async HTTP client being developed by Jean-francois Arcand at
   Sonatype
• Hoping to collaborate on research with Daniel Le Berre to determine if p2 can be used
 to do Maven resolution. Ultimately we would like to merge our code into p2 and just
 use p2
Aether Resolution Example
Easy to embed and simply use as a library

public void resolve( String remoteRepository, File localRepository )
    throws DependencyCollectionException, ArtifactResolutionException
{
    Aether aether = new Aether( repoRepository, localRepository );

    AetherResult result = aether.resolve( "com.mycompany.app", "super-app", "1.0" );

    // Get the root of the resolved tree of artifacts
    //
    DependencyNode root = result.getRoot();

    // Get the list of files for the artifacts resolved
    //
    List<File> artifacts = result.getResolvedFiles();

    // Get the classpath of the artifacts resolved
    //
    String classpath = result.getResolvedClassPath();
}
Aether Install & Deploy Example
Easy to embed and simply use as a library

public void installAndDeploy( String remoteRepository, File localRepository
                              String deployRepository )
    throws InstallationException, DeploymentException
{
    Aether aether = new Aether( remoteRepository, localRepository );

    Artifact artifact =
        new DefaultArtifact( "com.mycompany", "super-core", "jar", "1.0" );
    artifact = artifact.setFile( new File( "jar-from-whatever-process.jar" ) );
    Artifact pom = new SubArtifact( artifact, null, "pom" );
    pom = pom.setFile( new File( "pom-from-whatever-process.xml" ) );

    // Install into the local repository specified
    //
    aether.install( artifact, pom );

    // Deploy to the specified deploy reposistory
    //
    aether.deploy( artifact, pom, deployRepository );
}
Enriched component metadata
What is that and how do we get it?
• First we need to clean up the way artifacts get into Maven Central
Maven Central Quality
Sonatype is working hard to clean up Maven Central
• Bullet
• Bullet       https://docs.sonatype.org/display/Repository/Home
   • Bullet
Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson par Jason Van Zyl
Enriched component metadata
What is that and how do we get it?
• Project relationships
   • In order to do everything we want below we need to build up a comprehensive
   graph of all the relationships between projects in Maven Central
• Project statistics
   • Project really want to know how their projects are being consumed on Maven
   Central
• Quality metadata
   • Test coverage
   • Information provided by many of the existing tools like PMD, Checkstyle, Findbugs
• Provenance metadata
   • License information
   • IP information
• Security metadata
   • Tracking vulnerabilities and determining how it affects your organization
Enhanced IDE connectivity to the infrastructure
The IDE is the cockpit for a developer and be easy to get into
• Onboarding & updating
  • Getting developers up and running quickly & helping developers update
   environments and transition to new projects
• Connectivity to
   • Maven
   • SCM
   • Hudson
   • Nexus
   • Proviso
• Connectivity to enhanced Maven Central metadata
Developer Onboarding & Updating

MSE Codebase                         Publish Lineup
Eclipse Preferences

                                       Publish Codebase
Codebase Description/Icon


                     (one or more)
Source Tree
 SCM Information
                                       Request Codebase
 Project Information
                                                       Materialize/Update
 Source Roots




MSE Lineup

  Eclipse Distribution

  Eclipse Plugins/
  Components
Nexus: Access to Archetypes
Nexus: Access to Artifacts
Nexus: Access to Plugins
Idiom: Access Wikis
Hudson: Access to Build Jobs
Hudson: Access to Build Job Details
Hudson: Direct Navigation to Test Failures
Questions & Answers

More Related Content

What's hot

Introducing Spring Framework 5.3
Introducing Spring Framework 5.3Introducing Spring Framework 5.3
Introducing Spring Framework 5.3VMware Tanzu
 
Development Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True StoryDevelopment Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True StoryGlobalLogic Ukraine
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Summer Lu
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoftvenkata20k
 
Java springboot microservice - Accenture Technology Meetup
Java springboot microservice - Accenture Technology MeetupJava springboot microservice - Accenture Technology Meetup
Java springboot microservice - Accenture Technology MeetupAccenture Hungary
 
Building 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesBuilding 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesJakarta_EE
 
Developer Week - Reacting to an event-driven world
Developer Week - Reacting to an event-driven worldDeveloper Week - Reacting to an event-driven world
Developer Week - Reacting to an event-driven worldGrace Jansen
 
Getting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA releaseGetting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA releaseVMware Tanzu
 
Nightly build done right
Nightly build done rightNightly build done right
Nightly build done rightLiora Milbaum
 
Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"LogeekNightUkraine
 
Spring Framework 5.0: Hidden Gems
Spring Framework 5.0: Hidden GemsSpring Framework 5.0: Hidden Gems
Spring Framework 5.0: Hidden GemsVMware Tanzu
 
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014Joelith
 

What's hot (20)

Introducing Spring Framework 5.3
Introducing Spring Framework 5.3Introducing Spring Framework 5.3
Introducing Spring Framework 5.3
 
Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot! Ready! Steady! SpringBoot!
Ready! Steady! SpringBoot!
 
Development Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True StoryDevelopment Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True Story
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
 
Session 2
Session 2Session 2
Session 2
 
Session 2
Session 2Session 2
Session 2
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 
Java springboot microservice - Accenture Technology Meetup
Java springboot microservice - Accenture Technology MeetupJava springboot microservice - Accenture Technology Meetup
Java springboot microservice - Accenture Technology Meetup
 
Building 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesBuilding 12-factor Cloud Native Microservices
Building 12-factor Cloud Native Microservices
 
Developer Week - Reacting to an event-driven world
Developer Week - Reacting to an event-driven worldDeveloper Week - Reacting to an event-driven world
Developer Week - Reacting to an event-driven world
 
Getting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA releaseGetting Reactive with Spring Framework 5.0’s GA release
Getting Reactive with Spring Framework 5.0’s GA release
 
Mobile web development
Mobile web developmentMobile web development
Mobile web development
 
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško VukmanovićJavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Nightly build done right
Nightly build done rightNightly build done right
Nightly build done right
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"
 
JENKINS Training
JENKINS TrainingJENKINS Training
JENKINS Training
 
Spring Framework 5.0: Hidden Gems
Spring Framework 5.0: Hidden GemsSpring Framework 5.0: Hidden Gems
Spring Framework 5.0: Hidden Gems
 
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
Continuous Integration Fundamentals: Maven - OFM Canberra July 2014
 

Viewers also liked

Repository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryRepository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryStephen Chin
 
Artifactory Docker Integration Webinar
Artifactory Docker Integration WebinarArtifactory Docker Integration Webinar
Artifactory Docker Integration WebinarBaruch Sadogursky
 
Sonatype's 2013 OSS Software Survey
 Sonatype's 2013 OSS Software Survey Sonatype's 2013 OSS Software Survey
Sonatype's 2013 OSS Software SurveySonatype
 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Gilad Garon
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...Sonatype
 

Viewers also liked (6)

Repository Management with JFrog Artifactory
Repository Management with JFrog ArtifactoryRepository Management with JFrog Artifactory
Repository Management with JFrog Artifactory
 
Artifactory Docker Integration Webinar
Artifactory Docker Integration WebinarArtifactory Docker Integration Webinar
Artifactory Docker Integration Webinar
 
Artifactory UOC
Artifactory UOCArtifactory UOC
Artifactory UOC
 
Sonatype's 2013 OSS Software Survey
 Sonatype's 2013 OSS Software Survey Sonatype's 2013 OSS Software Survey
Sonatype's 2013 OSS Software Survey
 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
 

Similar to Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson par Jason Van Zyl

Next Generation Development Infrastructure with the Maven Enterprise Stack
Next Generation Development Infrastructure with the Maven Enterprise StackNext Generation Development Infrastructure with the Maven Enterprise Stack
Next Generation Development Infrastructure with the Maven Enterprise StackTim O'Brien
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Robert Scholte
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsJohn Ferguson Smart Limited
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseMatt Raible
 
Apache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyApache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyVolodymyr Ostapiv
 
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)François Le Droff
 
Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?Sander Mak (@Sander_Mak)
 
Software Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab ManagementSoftware Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab ManagementNico Orschel
 
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012CloudBees
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenAlan Parkinson
 

Similar to Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson par Jason Van Zyl (20)

Next Generation Development Infrastructure with the Maven Enterprise Stack
Next Generation Development Infrastructure with the Maven Enterprise StackNext Generation Development Infrastructure with the Maven Enterprise Stack
Next Generation Development Infrastructure with the Maven Enterprise Stack
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Project Apash
Project ApashProject Apash
Project Apash
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Maven overview
Maven overviewMaven overview
Maven overview
 
Maven nutshell
Maven nutshellMaven nutshell
Maven nutshell
 
Maven
MavenMaven
Maven
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yards
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuse
 
Apache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT AcademyApache Maven for SoftServe IT Academy
Apache Maven for SoftServe IT Academy
 
Ant, Maven and Jenkins
Ant, Maven and JenkinsAnt, Maven and Jenkins
Ant, Maven and Jenkins
 
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?Cross-Build Injection attacks: how safe is your Java build?
Cross-Build Injection attacks: how safe is your Java build?
 
Maven overview
Maven overviewMaven overview
Maven overview
 
Software Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab ManagementSoftware Testen mit Visual Studio Lab Management
Software Testen mit Visual Studio Lab Management
 
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
Accelerate your PaaS to the Mobile World: Silicon Valley Code Camp 2012
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with maven
 

More from EclipseDayParis

La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...
La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...
La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...EclipseDayParis
 
Analyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric MadiotAnalyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric MadiotEclipseDayParis
 
Solution de génération de rapport OpenDocument à partir de plusieurs sources ...
Solution de génération de rapport OpenDocument à partir de plusieurs sources ...Solution de génération de rapport OpenDocument à partir de plusieurs sources ...
Solution de génération de rapport OpenDocument à partir de plusieurs sources ...EclipseDayParis
 
Eclipse Modeling pour fabriquer ses DSL par Etienne Juliot
Eclipse Modeling pour fabriquer ses DSL par Etienne JuliotEclipse Modeling pour fabriquer ses DSL par Etienne Juliot
Eclipse Modeling pour fabriquer ses DSL par Etienne JuliotEclipseDayParis
 
Actuate BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...
Actuate  BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...Actuate  BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...
Actuate BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...EclipseDayParis
 
Témoignage client ProxiAD
Témoignage client ProxiADTémoignage client ProxiAD
Témoignage client ProxiADEclipseDayParis
 
Témoignage client Zenika
Témoignage client ZenikaTémoignage client Zenika
Témoignage client ZenikaEclipseDayParis
 
Eclipse RT projects Gemini web and Virgo par Steve Powell
Eclipse RT projects Gemini web and Virgo par Steve PowellEclipse RT projects Gemini web and Virgo par Steve Powell
Eclipse RT projects Gemini web and Virgo par Steve PowellEclipseDayParis
 
Using git in eclipse by Chris Aniszczyk
Using git in eclipse by Chris AniszczykUsing git in eclipse by Chris Aniszczyk
Using git in eclipse by Chris AniszczykEclipseDayParis
 
Keynote de Mike Milinkovich
Keynote de Mike MilinkovichKeynote de Mike Milinkovich
Keynote de Mike MilinkovichEclipseDayParis
 

More from EclipseDayParis (11)

La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...
La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...
La gestion de la donnée avec Eclipse et l'Ingénierie dirigée par les Modèles ...
 
Analyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric MadiotAnalyze your software assets with Modisco par Frédéric Madiot
Analyze your software assets with Modisco par Frédéric Madiot
 
Solution de génération de rapport OpenDocument à partir de plusieurs sources ...
Solution de génération de rapport OpenDocument à partir de plusieurs sources ...Solution de génération de rapport OpenDocument à partir de plusieurs sources ...
Solution de génération de rapport OpenDocument à partir de plusieurs sources ...
 
Eclipse Modeling pour fabriquer ses DSL par Etienne Juliot
Eclipse Modeling pour fabriquer ses DSL par Etienne JuliotEclipse Modeling pour fabriquer ses DSL par Etienne Juliot
Eclipse Modeling pour fabriquer ses DSL par Etienne Juliot
 
Actuate BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...
Actuate  BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...Actuate  BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...
Actuate BIRT dans tous ses états : Reporting, Interactif, Ad-hoc, Analytique...
 
Témoignage client ProxiAD
Témoignage client ProxiADTémoignage client ProxiAD
Témoignage client ProxiAD
 
Temoignage Six Telekurs
Temoignage Six TelekursTemoignage Six Telekurs
Temoignage Six Telekurs
 
Témoignage client Zenika
Témoignage client ZenikaTémoignage client Zenika
Témoignage client Zenika
 
Eclipse RT projects Gemini web and Virgo par Steve Powell
Eclipse RT projects Gemini web and Virgo par Steve PowellEclipse RT projects Gemini web and Virgo par Steve Powell
Eclipse RT projects Gemini web and Virgo par Steve Powell
 
Using git in eclipse by Chris Aniszczyk
Using git in eclipse by Chris AniszczykUsing git in eclipse by Chris Aniszczyk
Using git in eclipse by Chris Aniszczyk
 
Keynote de Mike Milinkovich
Keynote de Mike MilinkovichKeynote de Mike Milinkovich
Keynote de Mike Milinkovich
 

Next Generation Development Infrastructure: Maven, m2eclipse, Nexus & Hudson par Jason Van Zyl

  • 1. Maven 3.x: The Evolution of Enterprise Java Build Infrastructures The Maven-related tooling youʼll be using in your infrastructure for years to come Jason van Zyl http://twitter.com/jvanzyl
  • 2. Agenda & Session Goals What weʼre going to talk about and accomplish this session 2. Developer checks in source code 3. Hudson checks out the source code M2Eclipse 2 Git 3 Hudson 4. Hudson instructs Maven to perform 4 1 the automated build 1. Developer requests binary dependencies from Nexus Nexus 5 Maven 5. Maven deploys build 6a. Proviso requests artifacts to Nexus updates to runtime components 6 6b. Nexus sends component from Nexus updates to Proviso Maven Central++ Maven Central Agent Proviso 7 Agent Agent 7. Proviso provisions components and configurations into the target runtime
  • 3. Agenda & Session Goals What weʼre going to talk about and accomplish this session To understand how Maven 3.x and its related tools & frameworks are going to help us get to that ideal delivery infrastructure
  • 4. Updates on Maven, M2Eclipse & Tycho ... Whatʼs going on at Sonatype & in Maven land? • Maven 3.0-final has been released. Yay! • Sonatype is planning features for what we would like to see in Maven 3.1 • M2Eclipse 1.0 will be released after two 4-6 week iterations or so. • Itʼs getting better rapidly because most of Sonatypeʼs Eclipse team is working on it. • We are moving M2Eclipse to the Eclipse Foundation • Weʼve started checking in the code at the Eclipse Foundation • Tycho passed its project creation review at the Eclipse Foundation, has been provisioned, and will soon begin the parallel IP process • MavenShell 1.0 will be released December 1st • PolyglotMaven 1.0 will be released January 1st • PDE replacement using Tycho hopefully demo-ready in a couple weeks • We hope to submit our JSR-330 and REST work to the Hudson project soon & possibly working with Oracle to implement Maven 3.x support
  • 5. Maven Central Unique IPs / Month [Aug2009 to Aug2010] 900,000 832,749 787,939 789,814 735,809 742,882 712,863 723,822 698,823 667,708 675,000 646,600 588,141 557,734 514,589 450,000 Maven is the de facto component distribution infrastructure for Java projects Maven Central is the de facto 225,000 store house of all Open Source Java components: ~300M hits/month 0 Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul! Aug non-Maven < 0.5% 2008 Total Unique IPs: 1,836,709 RM < 7% 2009 Total Unique IPs: 3,978,964 2010 Total Unique IPs: 6,024,701(end of Aug)
  • 6. Maven 3.1 Whatʼs going on for Maven 3.1 • POM interoperability • Maven 3.1 Plugin API (SM --> AM) • JSR-330 • Java5 annotations • Tight integration with M2Eclipse • Build avoidance • Mixins (SM --> AM) • Versionless parents in child POMs (SM --> AM) • Concurrent-access local repository implementation (SM) • Async HTTP Client connector for Aether (SM) • Async HTTP Client Wagon (SM) • Dynamic Extension API (SM) • Eventing API (SM)
  • 7. Sonatypeʼs Maven Plan Rapidly innovate while being reconciled to the Apache Way MavenIDE @ Github M2Eclipse MavenShell @ Github @ Eclipse Sonatype Maven Apache Maven Tycho @ Eclipse @ Github Apache Maven Polyglot Maven F1 F2 F3 @ Github @ Github
  • 8. A Maven-focused Hudson Sonatype is doing a lot of work with Hudson • JSR-330-based plugins • REST support using Apache Wink • Global configuration management • Apache Shiro integration for security management and SSO • Slave tool provisioning with Proviso (based on Eclipse p2) • Integration with M2Eclipse (Sonatype Professional) • Maven 3.x integration (in progress) • Long-lived workflow using Drools Flow (research)
  • 9. The Idea Development Infrastructure Now letʼs talk about some of the underlying technologies 2. Developer checks in source code 3. Hudson checks out the source code M2Eclipse 2 Git 3 Hudson 4. Hudson instructs Maven to perform 4 1 the automated build 1. Developer requests binary dependencies from Nexus Nexus 5 Maven 5. Maven deploys build 6a. Proviso requests artifacts to Nexus updates to runtime components 6 6b. Nexus sends component from Nexus updates to Proviso Maven Central++ Maven Central Agent Proviso 7 Agent Agent 7. Proviso provisions components and configurations into the target runtime
  • 10. The ideal Maven-focused delivery infrastructure What does that look like? • Shared component & plugin model • Shared transport system • Shared repository API • Enriched component metadata • Enhanced IDE connectivity to the infrastructure • Provisioning (I think this might have to wait until the next webinar)
  • 11. Shared component model For Sonatype this means JSR-330 M2Eclipse Git Hudson Nexus Maven Agent Proviso JSR-330 Agent Agent
  • 12. Moving from Plexus to Guice & JSR-330 Making it all work with Guice • Requirements • Absolutely no code changes for any Maven, Nexus, M2Eclipse component • Must support Plexusʼ classpath/resource scanning • Must support Plexusʼ dynamic component assembly based on discovered metadata • Must support Plexusʼ configuration & converter mechanism • When we need changes made to the runtime container, we need those changes to be timely • Support for arbitrary lifecycles • We need the container to be wed with OSGi -- for us the answer is Peaberry • Component graph proxy support: for components and configuration • Dynamic language support
  • 13. Implications of using JSR-330 We bring some sanity to tooling • Writing plugins in various ways for tools like Maven, Nexus, Hudson, Sonar & Eclipse has a great deal of mental overhead. This burden will be removed. • The implications for development, testing and delivery are huge. They cannot be understated • Common development models: how to create JSR-330-based plugins, better component reuse, a common understand of infrastructure tooling • Common testing frameworks for JSR-330 e.g Sonatypeʼs REST/UI toolkit • Common provisioning models
  • 14. Sisu Maven Plugin Example Using the same component model @Goal( "webxml" ) @Phase( GENERATE_RESOURCES ) @RequiresProject @Threadsafe public class GenerateWebXml extends SisuMavenMojo { @Inject Logger logger; @Inject private Component component; @Inject @Named( "${project}" ) private MavenProject project; @Inject @Named( "${outputDirectory}" ) @DefaultsTo( "${project.build.directory}" ) private File outputDirectory; @Inject private List<WebXmlAugmenter> webXmlAugmenters; public void execute() throws Exception { component.generate( project, webXmlAugmenters, outputDirectory ); } }
  • 15. Sisu Hudson Plugin Example Using the same component model @Named @Singleton public class RestPlugin extends Plugin { @Inject private Logger logger; private transient List<ApiProvider> providers; private boolean enabled = true; @Inject public RestPlugin(final List<ApiProvider> providers) { assert providers != null; this.providers = providers; logger.debug("Providers:"); for (ApiProvider provider : providers) { logger.debug( " {}", provider );         }     } }
  • 16. Sisu Nexus Plugin Example Using the same component model @Named @Singleton @Path( CapabilitiesResource.RESOURCE_URI ) @Produces( { "application/xml", "application/json" } ) @Consumes( { "application/xml", "application/json" } ) public class CapabilitiesResource implements Resource { public static final String RESOURCE_URI = "/capabilities"; private final CapabilityConfiguration capabilitiesConfiguration; private final CapabilityDescriptorRegistry capabilityDescriptorRegistry; @Inject public CapabilitiesResource( CapabilityConfiguration capabilitiesConfiguration, CapabilityDescriptorRegistry capabilityDescriptorRegistry ) { this.capabilitiesConfiguration = capabilitiesConfiguration; this.capabilityDescriptorRegistry = capabilityDescriptorRegistry; ... } }
  • 17. Shared transport system For Sonatype this means the Async HTTP Client M2Eclipse Git Hudson Nexus Maven Agent Proviso Agent Agent Async HTTP Client
  • 18. Shared repository API For Sonatype this means our new Aether library M2Eclipse Git Hudson 1 Nexus 5 Maven 6 Agent Proviso 7 Aether Agent Agent
  • 19. Aether Overhauled Repository Artifact Resolution API • The artifact resolution code has always been relatively decoupled, but Aether is a completely stand-alone library and has no dependencies on Maven • SSL support • DAV support • Proxies • NTLM(v2) • Transport • Weʼre using the Async HTTP client being developed by Jean-francois Arcand at Sonatype • Hoping to collaborate on research with Daniel Le Berre to determine if p2 can be used to do Maven resolution. Ultimately we would like to merge our code into p2 and just use p2
  • 20. Aether Resolution Example Easy to embed and simply use as a library public void resolve( String remoteRepository, File localRepository ) throws DependencyCollectionException, ArtifactResolutionException { Aether aether = new Aether( repoRepository, localRepository ); AetherResult result = aether.resolve( "com.mycompany.app", "super-app", "1.0" ); // Get the root of the resolved tree of artifacts // DependencyNode root = result.getRoot(); // Get the list of files for the artifacts resolved // List<File> artifacts = result.getResolvedFiles(); // Get the classpath of the artifacts resolved // String classpath = result.getResolvedClassPath(); }
  • 21. Aether Install & Deploy Example Easy to embed and simply use as a library public void installAndDeploy( String remoteRepository, File localRepository String deployRepository ) throws InstallationException, DeploymentException { Aether aether = new Aether( remoteRepository, localRepository ); Artifact artifact = new DefaultArtifact( "com.mycompany", "super-core", "jar", "1.0" ); artifact = artifact.setFile( new File( "jar-from-whatever-process.jar" ) ); Artifact pom = new SubArtifact( artifact, null, "pom" ); pom = pom.setFile( new File( "pom-from-whatever-process.xml" ) ); // Install into the local repository specified // aether.install( artifact, pom ); // Deploy to the specified deploy reposistory // aether.deploy( artifact, pom, deployRepository ); }
  • 22. Enriched component metadata What is that and how do we get it? • First we need to clean up the way artifacts get into Maven Central
  • 23. Maven Central Quality Sonatype is working hard to clean up Maven Central • Bullet • Bullet https://docs.sonatype.org/display/Repository/Home • Bullet
  • 25. Enriched component metadata What is that and how do we get it? • Project relationships • In order to do everything we want below we need to build up a comprehensive graph of all the relationships between projects in Maven Central • Project statistics • Project really want to know how their projects are being consumed on Maven Central • Quality metadata • Test coverage • Information provided by many of the existing tools like PMD, Checkstyle, Findbugs • Provenance metadata • License information • IP information • Security metadata • Tracking vulnerabilities and determining how it affects your organization
  • 26. Enhanced IDE connectivity to the infrastructure The IDE is the cockpit for a developer and be easy to get into • Onboarding & updating • Getting developers up and running quickly & helping developers update environments and transition to new projects • Connectivity to • Maven • SCM • Hudson • Nexus • Proviso • Connectivity to enhanced Maven Central metadata
  • 27. Developer Onboarding & Updating MSE Codebase Publish Lineup Eclipse Preferences Publish Codebase Codebase Description/Icon (one or more) Source Tree SCM Information Request Codebase Project Information Materialize/Update Source Roots MSE Lineup Eclipse Distribution Eclipse Plugins/ Components
  • 28. Nexus: Access to Archetypes
  • 29. Nexus: Access to Artifacts
  • 30. Nexus: Access to Plugins
  • 32. Hudson: Access to Build Jobs
  • 33. Hudson: Access to Build Job Details
  • 34. Hudson: Direct Navigation to Test Failures