SlideShare a Scribd company logo
Planning and Managing Software Projects 2011-12



Maven

Emanuele Della Valle, Lecturer: Daniele Dell’Aglio
http://emanueledellavalle.org
What is Maven?
   Maven is a project management tool
         Build automation tool
         Deployment tool
         Documentation generator
         Report generator
         ...
   Even if the focus in on Java projects, other
    programming languages are supported (C#, Ruby,
    etc.)




Planning and Managing Software Projects – Emanuele Della Valle
Convention
   Maven exploits the «Convention over configuration»
    approach
         Assumption about the location of source code, test,
          resources
         Assumption about the location of the output
         Etc.
   In general the conventions can be customized by users
   Example: folder layout
                  src/main/java
                  src/main/resources
                  src/test/java
                  src/test/resources



(http://maven.apache.org/guides/introduction/introduction-to-the-standard-
directory-layout.html)
Planning and Managing Software Projects – Emanuele Della Valle
Project Object Model
    The key element is the Project Object Model (POM)
    It is a xml file (pom.xml) located in the root of the
     project folder
    It contains the description of the project and all the
     information required by Maven
    POM contains:
            Project coordinates
            Dependencies
            Plugins
            Repositories
    A POM can be easily generated through
                                      mvn archetype:generate


 Planning and Managing Software Projects – Emanuele Della Valle
Project coordinates
       It is the “passport” of the artifact
       The required information are:
             Model version: the version of the POM
             Group id: unique identificator of the group/organization
              that creates the artifact
             Artifact id: unique identificator of the artifact
             Version: the version of the artifact. If the artifact is a
              non-stable/under development component, -SNAPSHOT
              should be added after the version number
      Another important information is the packaging
             It influences the build lifecycles
             Core packaging: jar (default), pom, maven-plugin, ejb,
              war, ear, rar, par



    Planning and Managing Software Projects – Emanuele Della Valle
Project coordinates
<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>pmsp.maven</groupId>
   <artifactId>firstexample</artifactId>
   <version>0.1</version>
   <packaging>jar</packaging>
</project>




 Planning and Managing Software Projects – Emanuele Della Valle
Dependencies
   POM contains the description of the artifacts
    required by the project
   Each dependency contains
         The required artifact (identified by its coordinates)
         The scope: controls the inclusion in the application
          and the availability in the classpath
                compile (default): required for compilation, in the
                 classpath and packaged
                provided: required for compilation, in the classpath but not
                 packaged (e.g. servlet.jar)
                runtime: required for the execution but not for the
                 compilation (e.g. JDBC, SLF4J bridges)
                test: required only for testing, not packaged (e.g. JUnit)
                system: like provided but with an explicit folder location


Planning and Managing Software Projects – Emanuele Della Valle
Dependencies
   In general the dependency is transitive
         It depends on the scope!
          http://maven.apache.org/guides/introduction/introductio
          n-to-dependency-mechanism.html#Dependency_Scope
   If the project requires artifact A, and artifact A requires
    artifact B, then also artifact B will be included in the
    project
   Users can disable the transitivity through the exclusion
    command




Planning and Managing Software Projects – Emanuele Della Valle
Dependencies
…
<dependencies>
         <dependency>
              <groupId>junit</groupId>
              <artifactId>junit</artifactId>
              <version>4.10</version>
              <scope>test</scope>
         </dependency>
        …
    </dependencies>
…



Planning and Managing Software Projects – Emanuele Della Valle
Plugins and Goals
     The Maven core doesn't contain the logic to compile,
      test, package the software
     Those features are provided through plugins
       •    Examples: archetype, jar, compiler, surefire
     As dependencies, projects should declare what are the
      required plugins
...
<plugins>
   <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <version>2.10</version>
   </plugin>
</plugins>
...

Planning and Managing Software Projects – Emanuele Della Valle
Goals
    Each plugin offers a set of goals
          A goal is an executable task
                                           plugin
                                                                  goal 1

                                                                  goal 2

                                                                  goal 3


 A goal can be invoked in the following way:
                                               mvn plugin:goal
 Example:
                                     mvn archetype:generate



 Planning and Managing Software Projects – Emanuele Della Valle
Phases and lifecycles
    A phase is a step in the build lifecycle, which is an
     ordered sequence of phases. [Apache Maven manual]
    Lifecycles can be used to execute mutliple operations
           A lifecycle models a sequence of operations
    Each step of a lifecycle is a phase
    When a lifecycle is executed, plugin goals are bound to
     the phases
            The goal bindings depends by the packaging!
    Built-in lifecycle
            default
            clean
            site

(http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html)
 Planning and Managing Software Projects – Emanuele Della Valle
Lifecycles: default (simplified)
                                                                  validate


                                                                  compile


                                                                    test


                                                              package


                                                         integration-test


                                                                   verify


                                                                   install


                                                                  deploy

 Planning and Managing Software Projects – Emanuele Della Valle
Lifecycles: default (simplified) - packaging jar

            validate
            compile                                • compiler:compile

                  test                             • surefire:test

           package                                 • jar:jar

 integration-test
               verify
               install                             • install:install

             deploy                                • deploy:deploy
 Planning and Managing Software Projects – Emanuele Della Valle
Lifecycles: default (simplified) - packaging pom

            validate
            compile
                  test
           package                                 • site:attach-descriptor

 integration-test
               verify
               install                             • install:install

             deploy                                • deploy:deploy
 Planning and Managing Software Projects – Emanuele Della Valle
Repositories
    Repositories are the places where dependencies and
     plugins are located
           They are declared into the POM
    When Maven runs, it connects to the repositories in
     order to retrieve the dependencies and the plugins
    There is a special repository that is built by Maven on
     the local machine
            It is located in these locations:
              –    Unix: ~/.m2/repository
              –    Win: C:%USER%.m2
      •     Its purpose is twofold:
              –   It is a cache
              –   Artifacts can be installed there (install:install) and be
                  available for the other artifacts



 Planning and Managing Software Projects – Emanuele Della Valle
Repositories
<repositories>
    <repository>
        <id>central</id>
        <name>Maven Repository Switchboard</name>
        <layout>default</layout>
        <url>http://repo1.maven.org/maven2</url>
        <snapshots>
             <enabled>false</enabled>
        </snapshots>
    </repository>
    ...
</repositories>
<pluginRepositories>
    <pluginRepository>
        ...
    </pluginRepository>
</pluginRepositories>

 Planning and Managing Software Projects – Emanuele Della Valle
References
 Maven http://maven.apache.org/guides/
 Apache Maven 2 (Dzone RefCard)
  http://refcardz.dzone.com/refcardz/apache-maven-2
 Maven: the complete reference (Sonatype)
  http://www.sonatype.com/books/mvnref-
  book/reference/
 Maven – The definitive Guide (O’Reilly)
  http://www.amazon.com/Maven-Definitive-Guide-
  Sonatype-Company/dp/0596517335




Planning and Managing Software Projects – Emanuele Della Valle

More Related Content

What's hot

Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad
 
Apache Maven
Apache MavenApache Maven
Apache Maven
Rahul Tanwani
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
MD Sayem Ahmed
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
Onkar Deshpande
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
David Noble
 
Drupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseDrupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study Case
Emanuele Quinto
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
Ankit Gubrani
 
Continuous delivery-with-maven
Continuous delivery-with-mavenContinuous delivery-with-maven
Continuous delivery-with-maven
John Ferguson Smart Limited
 
Maven basics
Maven basicsMaven basics
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
Sid Anand
 
Maven plugins, properties en profiles: Advanced concepts in Maven
Maven plugins, properties en profiles: Advanced concepts in MavenMaven plugins, properties en profiles: Advanced concepts in Maven
Maven plugins, properties en profiles: Advanced concepts in Maven
Geert Pante
 
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
John Ferguson Smart Limited
 
Maven
MavenMaven
Maven
feng lee
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenAlan Parkinson
 
02 - Build and Deployment Management
02 - Build and Deployment Management02 - Build and Deployment Management
02 - Build and Deployment ManagementSergii Shmarkatiuk
 
Maven ppt
Maven pptMaven ppt
Maven ppt
natashasweety7
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
Tomer Gabel
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
Mike Ensor
 
Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery Overview
Will Iverson
 

What's hot (20)

Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
Drupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseDrupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study Case
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven
 
Continuous delivery-with-maven
Continuous delivery-with-mavenContinuous delivery-with-maven
Continuous delivery-with-maven
 
Maven basics
Maven basicsMaven basics
Maven basics
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Maven plugins, properties en profiles: Advanced concepts in Maven
Maven plugins, properties en profiles: Advanced concepts in MavenMaven plugins, properties en profiles: Advanced concepts in Maven
Maven plugins, properties en profiles: Advanced concepts in 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
 
Maven
MavenMaven
Maven
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with maven
 
02 - Build and Deployment Management
02 - Build and Deployment Management02 - Build and Deployment Management
02 - Build and Deployment Management
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery Overview
 

Viewers also liked

Wapz
WapzWapz
IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)
IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)
IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)
Daniele Dell'Aglio
 
Learning for a New Leadership:The Collaborative Redesign of Lidera Programme
Learning for a New Leadership:The Collaborative Redesign of Lidera ProgrammeLearning for a New Leadership:The Collaborative Redesign of Lidera Programme
Learning for a New Leadership:The Collaborative Redesign of Lidera ProgrammeObservatório do Recife
 
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
Daniele Dell'Aglio
 

Viewers also liked (6)

Wapz
WapzWapz
Wapz
 
IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)
IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)
IMaRS - Incremental Materialization for RDF Streams (SR4LD2013)
 
Kapittel 15
Kapittel 15Kapittel 15
Kapittel 15
 
Learning for a New Leadership:The Collaborative Redesign of Lidera Programme
Learning for a New Leadership:The Collaborative Redesign of Lidera ProgrammeLearning for a New Leadership:The Collaborative Redesign of Lidera Programme
Learning for a New Leadership:The Collaborative Redesign of Lidera Programme
 
Kapittel 15
Kapittel 15Kapittel 15
Kapittel 15
 
RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)RDF Stream Processing Models (RSP2014)
RDF Stream Processing Models (RSP2014)
 

Similar to P&MSP2012 - Maven

Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management toolRenato Primavera
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
AnkurSingh656748
 
Maven
MavenMaven
Maven
MavenMaven
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
Gourav Varma
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
Hsi-Kai Wang
 
Maven
MavenMaven
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
Raghavan Mohan
 
Introduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOpsIntroduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOps
SISTechnologies
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
venkata20k
 
Maven
MavenMaven
Maven
MavenMaven
Maven
Shraddha
 
Java build tools
Java build toolsJava build tools
Java build toolsSujit Kumar
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
Eric Wyles
 
Maven
MavenMaven
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
Mert Çalışkan
 
Maven
MavenMaven
Maven
Emprovise
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 

Similar to P&MSP2012 - Maven (20)

Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Mavennotes.pdf
Mavennotes.pdfMavennotes.pdf
Mavennotes.pdf
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
 
Maven
MavenMaven
Maven
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Introduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOpsIntroduction to Maven for beginners and DevOps
Introduction to Maven for beginners and DevOps
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoft
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Java build tools
Java build toolsJava build tools
Java build tools
 
(Re)-Introduction to Maven
(Re)-Introduction to Maven(Re)-Introduction to Maven
(Re)-Introduction to Maven
 
Maven
MavenMaven
Maven
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Maven
MavenMaven
Maven
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 

More from Daniele Dell'Aglio

Distributed stream consistency checking
Distributed stream consistency checkingDistributed stream consistency checking
Distributed stream consistency checking
Daniele Dell'Aglio
 
On web stream processing
On web stream processingOn web stream processing
On web stream processing
Daniele Dell'Aglio
 
On a web of data streams
On a web of data streamsOn a web of data streams
On a web of data streams
Daniele Dell'Aglio
 
Triplewave: a step towards RDF Stream Processing on the Web
Triplewave: a step towards RDF Stream Processing on the WebTriplewave: a step towards RDF Stream Processing on the Web
Triplewave: a step towards RDF Stream Processing on the Web
Daniele Dell'Aglio
 
On unifying query languages for RDF streams
On unifying query languages for RDF streamsOn unifying query languages for RDF streams
On unifying query languages for RDF streams
Daniele Dell'Aglio
 
RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...
RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...
RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...
Daniele Dell'Aglio
 
Summary of the Stream Reasoning workshop at ISWC 2016
Summary of the Stream Reasoning workshop at ISWC 2016Summary of the Stream Reasoning workshop at ISWC 2016
Summary of the Stream Reasoning workshop at ISWC 2016
Daniele Dell'Aglio
 
On Unified Stream Reasoning
On Unified Stream ReasoningOn Unified Stream Reasoning
On Unified Stream Reasoning
Daniele Dell'Aglio
 
On Unified Stream Reasoning - The RDF Stream Processing realm
On Unified Stream Reasoning - The RDF Stream Processing realmOn Unified Stream Reasoning - The RDF Stream Processing realm
On Unified Stream Reasoning - The RDF Stream Processing realm
Daniele Dell'Aglio
 
Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1
Daniele Dell'Aglio
 
Augmented Participation to Live Events through Social Network Content Enrichm...
Augmented Participation to Live Events through Social Network Content Enrichm...Augmented Participation to Live Events through Social Network Content Enrichm...
Augmented Participation to Live Events through Social Network Content Enrichm...
Daniele Dell'Aglio
 
An experience on empirical research about rdf stream
An experience on empirical research about rdf streamAn experience on empirical research about rdf stream
An experience on empirical research about rdf stream
Daniele Dell'Aglio
 
A Survey of Temporal Extensions of Description Logics
A Survey of Temporal Extensions of Description LogicsA Survey of Temporal Extensions of Description Logics
A Survey of Temporal Extensions of Description Logics
Daniele Dell'Aglio
 
RDF Stream Processing Models (SR4LD2013)
RDF Stream Processing Models (SR4LD2013)RDF Stream Processing Models (SR4LD2013)
RDF Stream Processing Models (SR4LD2013)
Daniele Dell'Aglio
 
Ontology based top-k query answering over massive, heterogeneous, and dynamic...
Ontology based top-k query answering over massive, heterogeneous, and dynamic...Ontology based top-k query answering over massive, heterogeneous, and dynamic...
Ontology based top-k query answering over massive, heterogeneous, and dynamic...
Daniele Dell'Aglio
 
On correctness in RDF stream processor benchmarking
On correctness in RDF stream processor benchmarkingOn correctness in RDF stream processor benchmarking
On correctness in RDF stream processor benchmarkingDaniele Dell'Aglio
 
An Ontological Formulation and an OPM profile for Causality in Planning Appli...
An Ontological Formulation and an OPM profile for Causality in Planning Appli...An Ontological Formulation and an OPM profile for Causality in Planning Appli...
An Ontological Formulation and an OPM profile for Causality in Planning Appli...
Daniele Dell'Aglio
 
P&MSP2012 - Version Control Systems
P&MSP2012 - Version Control SystemsP&MSP2012 - Version Control Systems
P&MSP2012 - Version Control SystemsDaniele Dell'Aglio
 
P&MSP2012 - Logging Frameworks
P&MSP2012 - Logging FrameworksP&MSP2012 - Logging Frameworks
P&MSP2012 - Logging FrameworksDaniele Dell'Aglio
 

More from Daniele Dell'Aglio (20)

Distributed stream consistency checking
Distributed stream consistency checkingDistributed stream consistency checking
Distributed stream consistency checking
 
On web stream processing
On web stream processingOn web stream processing
On web stream processing
 
On a web of data streams
On a web of data streamsOn a web of data streams
On a web of data streams
 
Triplewave: a step towards RDF Stream Processing on the Web
Triplewave: a step towards RDF Stream Processing on the WebTriplewave: a step towards RDF Stream Processing on the Web
Triplewave: a step towards RDF Stream Processing on the Web
 
On unifying query languages for RDF streams
On unifying query languages for RDF streamsOn unifying query languages for RDF streams
On unifying query languages for RDF streams
 
RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...
RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...
RSEP-QL: A Query Model to Capture Event Pattern Matching in RDF Stream Proces...
 
Summary of the Stream Reasoning workshop at ISWC 2016
Summary of the Stream Reasoning workshop at ISWC 2016Summary of the Stream Reasoning workshop at ISWC 2016
Summary of the Stream Reasoning workshop at ISWC 2016
 
On Unified Stream Reasoning
On Unified Stream ReasoningOn Unified Stream Reasoning
On Unified Stream Reasoning
 
On Unified Stream Reasoning - The RDF Stream Processing realm
On Unified Stream Reasoning - The RDF Stream Processing realmOn Unified Stream Reasoning - The RDF Stream Processing realm
On Unified Stream Reasoning - The RDF Stream Processing realm
 
Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1Querying the Web of Data with XSPARQL 1.1
Querying the Web of Data with XSPARQL 1.1
 
Augmented Participation to Live Events through Social Network Content Enrichm...
Augmented Participation to Live Events through Social Network Content Enrichm...Augmented Participation to Live Events through Social Network Content Enrichm...
Augmented Participation to Live Events through Social Network Content Enrichm...
 
An experience on empirical research about rdf stream
An experience on empirical research about rdf streamAn experience on empirical research about rdf stream
An experience on empirical research about rdf stream
 
A Survey of Temporal Extensions of Description Logics
A Survey of Temporal Extensions of Description LogicsA Survey of Temporal Extensions of Description Logics
A Survey of Temporal Extensions of Description Logics
 
RDF Stream Processing Models (SR4LD2013)
RDF Stream Processing Models (SR4LD2013)RDF Stream Processing Models (SR4LD2013)
RDF Stream Processing Models (SR4LD2013)
 
Ontology based top-k query answering over massive, heterogeneous, and dynamic...
Ontology based top-k query answering over massive, heterogeneous, and dynamic...Ontology based top-k query answering over massive, heterogeneous, and dynamic...
Ontology based top-k query answering over massive, heterogeneous, and dynamic...
 
On correctness in RDF stream processor benchmarking
On correctness in RDF stream processor benchmarkingOn correctness in RDF stream processor benchmarking
On correctness in RDF stream processor benchmarking
 
An Ontological Formulation and an OPM profile for Causality in Planning Appli...
An Ontological Formulation and an OPM profile for Causality in Planning Appli...An Ontological Formulation and an OPM profile for Causality in Planning Appli...
An Ontological Formulation and an OPM profile for Causality in Planning Appli...
 
P&MSP2012 - Version Control Systems
P&MSP2012 - Version Control SystemsP&MSP2012 - Version Control Systems
P&MSP2012 - Version Control Systems
 
P&MSP2012 - Unit Testing
P&MSP2012 - Unit TestingP&MSP2012 - Unit Testing
P&MSP2012 - Unit Testing
 
P&MSP2012 - Logging Frameworks
P&MSP2012 - Logging FrameworksP&MSP2012 - Logging Frameworks
P&MSP2012 - Logging Frameworks
 

Recently uploaded

Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 

Recently uploaded (20)

Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

P&MSP2012 - Maven

  • 1. Planning and Managing Software Projects 2011-12 Maven Emanuele Della Valle, Lecturer: Daniele Dell’Aglio http://emanueledellavalle.org
  • 2. What is Maven?  Maven is a project management tool  Build automation tool  Deployment tool  Documentation generator  Report generator  ...  Even if the focus in on Java projects, other programming languages are supported (C#, Ruby, etc.) Planning and Managing Software Projects – Emanuele Della Valle
  • 3. Convention  Maven exploits the «Convention over configuration» approach  Assumption about the location of source code, test, resources  Assumption about the location of the output  Etc.  In general the conventions can be customized by users  Example: folder layout  src/main/java  src/main/resources  src/test/java  src/test/resources (http://maven.apache.org/guides/introduction/introduction-to-the-standard- directory-layout.html) Planning and Managing Software Projects – Emanuele Della Valle
  • 4. Project Object Model  The key element is the Project Object Model (POM)  It is a xml file (pom.xml) located in the root of the project folder  It contains the description of the project and all the information required by Maven  POM contains:  Project coordinates  Dependencies  Plugins  Repositories  A POM can be easily generated through mvn archetype:generate Planning and Managing Software Projects – Emanuele Della Valle
  • 5. Project coordinates  It is the “passport” of the artifact  The required information are:  Model version: the version of the POM  Group id: unique identificator of the group/organization that creates the artifact  Artifact id: unique identificator of the artifact  Version: the version of the artifact. If the artifact is a non-stable/under development component, -SNAPSHOT should be added after the version number  Another important information is the packaging  It influences the build lifecycles  Core packaging: jar (default), pom, maven-plugin, ejb, war, ear, rar, par Planning and Managing Software Projects – Emanuele Della Valle
  • 6. Project coordinates <project> <modelVersion>4.0.0</modelVersion> <groupId>pmsp.maven</groupId> <artifactId>firstexample</artifactId> <version>0.1</version> <packaging>jar</packaging> </project> Planning and Managing Software Projects – Emanuele Della Valle
  • 7. Dependencies  POM contains the description of the artifacts required by the project  Each dependency contains  The required artifact (identified by its coordinates)  The scope: controls the inclusion in the application and the availability in the classpath  compile (default): required for compilation, in the classpath and packaged  provided: required for compilation, in the classpath but not packaged (e.g. servlet.jar)  runtime: required for the execution but not for the compilation (e.g. JDBC, SLF4J bridges)  test: required only for testing, not packaged (e.g. JUnit)  system: like provided but with an explicit folder location Planning and Managing Software Projects – Emanuele Della Valle
  • 8. Dependencies  In general the dependency is transitive  It depends on the scope! http://maven.apache.org/guides/introduction/introductio n-to-dependency-mechanism.html#Dependency_Scope  If the project requires artifact A, and artifact A requires artifact B, then also artifact B will be included in the project  Users can disable the transitivity through the exclusion command Planning and Managing Software Projects – Emanuele Della Valle
  • 9. Dependencies … <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> … </dependencies> … Planning and Managing Software Projects – Emanuele Della Valle
  • 10. Plugins and Goals  The Maven core doesn't contain the logic to compile, test, package the software  Those features are provided through plugins • Examples: archetype, jar, compiler, surefire  As dependencies, projects should declare what are the required plugins ... <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.10</version> </plugin> </plugins> ... Planning and Managing Software Projects – Emanuele Della Valle
  • 11. Goals  Each plugin offers a set of goals  A goal is an executable task plugin goal 1 goal 2 goal 3  A goal can be invoked in the following way: mvn plugin:goal  Example: mvn archetype:generate Planning and Managing Software Projects – Emanuele Della Valle
  • 12. Phases and lifecycles  A phase is a step in the build lifecycle, which is an ordered sequence of phases. [Apache Maven manual]  Lifecycles can be used to execute mutliple operations  A lifecycle models a sequence of operations  Each step of a lifecycle is a phase  When a lifecycle is executed, plugin goals are bound to the phases  The goal bindings depends by the packaging!  Built-in lifecycle  default  clean  site (http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html) Planning and Managing Software Projects – Emanuele Della Valle
  • 13. Lifecycles: default (simplified) validate compile test package integration-test verify install deploy Planning and Managing Software Projects – Emanuele Della Valle
  • 14. Lifecycles: default (simplified) - packaging jar validate compile • compiler:compile test • surefire:test package • jar:jar integration-test verify install • install:install deploy • deploy:deploy Planning and Managing Software Projects – Emanuele Della Valle
  • 15. Lifecycles: default (simplified) - packaging pom validate compile test package • site:attach-descriptor integration-test verify install • install:install deploy • deploy:deploy Planning and Managing Software Projects – Emanuele Della Valle
  • 16. Repositories  Repositories are the places where dependencies and plugins are located  They are declared into the POM  When Maven runs, it connects to the repositories in order to retrieve the dependencies and the plugins  There is a special repository that is built by Maven on the local machine  It is located in these locations: – Unix: ~/.m2/repository – Win: C:%USER%.m2 • Its purpose is twofold: – It is a cache – Artifacts can be installed there (install:install) and be available for the other artifacts Planning and Managing Software Projects – Emanuele Della Valle
  • 17. Repositories <repositories> <repository> <id>central</id> <name>Maven Repository Switchboard</name> <layout>default</layout> <url>http://repo1.maven.org/maven2</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> ... </repositories> <pluginRepositories> <pluginRepository> ... </pluginRepository> </pluginRepositories> Planning and Managing Software Projects – Emanuele Della Valle
  • 18. References  Maven http://maven.apache.org/guides/  Apache Maven 2 (Dzone RefCard) http://refcardz.dzone.com/refcardz/apache-maven-2  Maven: the complete reference (Sonatype) http://www.sonatype.com/books/mvnref- book/reference/  Maven – The definitive Guide (O’Reilly) http://www.amazon.com/Maven-Definitive-Guide- Sonatype-Company/dp/0596517335 Planning and Managing Software Projects – Emanuele Della Valle