SlideShare una empresa de Scribd logo
1 de 18
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

Más contenido relacionado

La actualidad más candente

Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1MD Sayem Ahmed
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and AntDavid 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 CaseEmanuele Quinto
 
Build Automation using Maven
Build Automation using Maven Build Automation using Maven
Build Automation using Maven Ankit Gubrani
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with MavenSid 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 MavenGeert 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 yardsJohn Ferguson Smart Limited
 
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 for Dummies
Maven for DummiesMaven for Dummies
Maven for DummiesTomer Gabel
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 OverviewMike Ensor
 
Continuous Delivery Overview
Continuous Delivery OverviewContinuous Delivery Overview
Continuous Delivery OverviewWill Iverson
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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 a 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 worldDmitry Bakaleinik
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicGourav Varma
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by ExampleHsi-Kai Wang
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialRaghavan 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 DevOpsSISTechnologies
 
Maven in mulesoft
Maven in mulesoftMaven in mulesoft
Maven in mulesoftvenkata20k
 
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 MavenEric Wyles
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
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 a 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
 

Más de Daniele Dell'Aglio

Distributed stream consistency checking
Distributed stream consistency checkingDistributed stream consistency checking
Distributed stream consistency checkingDaniele 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 WebDaniele 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 streamsDaniele 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 2016Daniele 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 realmDaniele 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.1Daniele 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 streamDaniele 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 LogicsDaniele 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
 

Más de 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
 

Último

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Último (20)

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

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