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. How will you accommodate for this ? Try to think if your program had not one but 100 dependencies (such a scenario is very common)
pom.xml <project xmlns=" xmlns:xsi=" xsi:schemaLocation=" ws.abhis.utdwrkshp rudimentary-logger jar 4.0-SNAPSHOT rudimentary-logger junit test org.apache.maven.plugins maven-compiler-plugin
pom.xml abhisws-repository Abhisws Repository
Setting up Eclipse with Maven & Creating a new project using Maven Modify settings.xml to use the workshop Maven repository settings.xml can be found at home/utd/.m2 Install the maven eclipse plugin Create a new project using: mvn archetype: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 mvn eclipse:eclipse
Project 5 Use the updated logger in Acme Corp. Project The updated logger can be found at: Use version 4.0-Snapshot
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
That’s it! Questions ? Thank You