1 / 10

Apache Maven 2

Apache Maven 2. Hva er Maven?. Forenkler prosjekt Prosjekt bygger Oppmuntrer best practice Dokumentasjon. Bakgrunn. Jakarta Alexandria Turbine Maven 1.x Maven 2. Begynne med Maven. http://maven.apache.org Sett miljøvariabler (MAVEN_HOME, PATH) mvn archetype:create

cianna
Download Presentation

Apache Maven 2

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. Apache Maven 2

  2. Hva er Maven? • Forenkler prosjekt • Prosjekt bygger • Oppmuntrer best practice • Dokumentasjon

  3. Bakgrunn • Jakarta Alexandria • Turbine • Maven 1.x • Maven 2

  4. Begynne med Maven • http://maven.apache.org • Sett miljøvariabler (MAVEN_HOME, PATH) • mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app • -DarchetypeArtifactId=maven-archetype-webapp

  5. Noen Kommandoer • mvn compile • mvn package • mvn install • mvn site • mvn clean • mvn eclipse:eclipse

  6. POM • Beskriver prosjektet • <project> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <version>1</version> </project>

  7. POM • <packaging>jar</packaging> • <name>my-app</name> • <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies>

  8. Repository • Lokal repository • Fjerntliggende repository

  9. Fordeler • Enkel å bruke • Nyttige plugins • Transitive Dependencies

  10. Ulemper • Tar tid å laste ned jar filer

More Related