1 / 12

Maven

Maven. Autor: Krzysztof Jasiołek. Plan prezentacji. Czym jest Maven? Struktura projektu Repozytoria Przykładowe projekty. Czym jest Maven?. Narzędzie wspomagające budowanie projektów Napisany w Javie Open Source Różnice w stosunku do ANT-a. Project Object Model. <project>

cuyler
Télécharger la présentation

Maven

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Maven Autor: Krzysztof Jasiołek

  2. Plan prezentacji • Czym jest Maven? • Struktura projektu • Repozytoria • Przykładowe projekty

  3. Czym jest Maven? • Narzędzie wspomagające budowanie projektów • Napisany w Javie • Open Source • Różnice w stosunku do ANT-a

  4. Project Object Model <project> <name>TestApp</name> <groupId>pl.test</groupId> <artifactId>TestApp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>tomcat</groupId> <artifactId>servlet-api</artifactId> <version>5.5.12</version> <scope>compile</scope> </dependency> <dependencies> <build/> <reporting/> … <licenses/> <contributors/> …

  5. Struktura projektu TestApp |-- pom.xml |-- src | |-- main | | |-- java | | | `-- pl | | | `-- test | | | `-- Test.java | | `-- resources | | `-- META-INF | | `-- application.properties | `-- test | `-- java | `-- pl | `-- test | `-- Test.java ‘-- target ‘– classes

  6. Repozytoria (1)

  7. Repozytoria (2) <project> … <dependencies> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>2.1</version> <scope>compile</scope> </dependency> </dependencies> … </project>

  8. Przykładowa aplikacja (1) • Prosta aplikacja webowa • Zdefiniowane zależności • Wykorzystanie testów jednostkowych • Generowanie strony projektu

  9. Przykładowa aplikacja (2) • Podział projektu na moduły • Różne typy plików wynikowych • Ostateczne otrzymanie pliku EAR

  10. Podsumowanie - zalety • Szybkość konfiguracji • Zarządzanie zależnościami • Przyspieszenie procesu tworzenia oprogramowania • Wspomaganie przeprowadzania testów jednostkowych • Możliwość rozszerzania poprzez system wtyczek

  11. Podsumowanie - wady • Niewielka liczba wtyczek dla wersji 2.0 • Słaba dokumentacja • Słaba integracja z IDE wersji 2.0

  12. Maven Zasoby: • http://maven.apache.org • http://mojo.codehaus.org • Maven: A Developer's Notebook (O’Reilly)

More Related