November 10th

Assignment

1. Install Maven on Linux
I downloaded Maven latest version and extract it to the Install directory.
Then I set the maven bin path in the .profile.
export M2_HOME=/home/kausik/Install/maven
export PATH=${M2_HOME}/bin:${PATH}

2. Follow maven in 5 minutes guide at apache - http://maven.apache.org/guides

3. Mind map on - maven build life cycle




4. Create Multi module project using maven (You can use IntellijIdea if you want)
I have created that using Intellij IDEA.

5. Configure maven compiler plugin to compile a java source files with java 7 diamond operator
The default maven plugin compiler doesn’t support to diamond operator. Therefore we have to add the new maven plugin compiler in the pom file. It wants to be 1.7 or greater than that.
After that we can use the mvn package command.
To run our Java file we have to use this command :
java -cp target/ModuleName-1.0-SNAPSHOT.jar fileName


6. Create executable jar using maven
After that we want to give mvn clean install . Then we can get the jar file.

0 Comments