1 / 8

MAVEN

MAVEN. Abhishek Dey Das | Sudhanshu Iyer. abhis.ws. |. siyer.info. An example…. The logger used in the Acme Project has been updated. The logger now supports severity levels. It is required that the programs you wrote use this updated dependency.

odetta
Download Presentation

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 AbhishekDey Das | Sudhanshu Iyer abhis.ws | siyer.info

  2. An example… • The logger used in the Acme Project has been updated. • The logger now supports severity levels. • It is required that the programs you wrote use this updated dependency. How will you accommodate for this ? Try to think if your program had not one but 100 dependencies (such a scenario is very common)

  3. pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>ws.abhis.utdwrkshp</groupId> <artifactId>rudimentary-logger</artifactId> <packaging>jar</packaging> <version>4.0-SNAPSHOT</version> <name>rudimentary-logger</name> <url>http://abhis.ws:8080/nexus</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build>

  4. pom.xml <distributionManagement> <repository> <id>abhisws-repository</id> <name>Abhisws Repository</name> <url>http://abhis.ws:8080/nexus/content/repositories/utd_workshop/</url> </repository> </distributionManagement> </project>

  5. Setting up Eclipse with Maven & Creating a new project using Maven • Modify settings.xml to use the workshop Maven repositorysettings.xml can be found at home/utd/.m2 • Install the maven eclipse plugin • Create a new project using: mvnarchetype:generate -DgroupId={project-packaging} -DartifactId={project-name} -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false • Import the project into eclipse • Tell eclipse that it’s a maven project mvneclipse:eclipse

  6. Project 5 • Use the updated logger in Acme Corp. ProjectThe updated logger can be found at: http://abhis.ws:8080/nexus • Use version 4.0-Snapshot

  7. Helpful List of Commands • mvn clean – Cleans the workspace • mvn test – Runs JUnit Tests • mvn compile – Complies the Project • mvn compile-test – Runs tests and based on results complies the Project • mvn deploy – Deploy artifacts to the maven repository

  8. That’s it! Questions ? Thank You 

More Related