A maven repository is a repository where files and artifacts of different types can be stored and can be shared by any number of builds.
Maven repositories can be classified into two: Local and Remote.
Local Repository: This is the one which is on your own installation. It might contain temporary build artifacts which are yet to be released. One can make the changes and test them at its local repository before making the release.
Remote Repository: This is the one which is setup by a third party and can be shared by many for downloading at the local repository.
Commands Used:
For cleaning your local repository, use mvn clean or mvn –o clean.
For building your repository, use mvn install or mvn –o install.
Note : ‘-o’ is used when you intend to do the clean/ build offline.
You can also write your command as mvn –o clean install.
You can also append
command to skip the test cases to be executed. This could make your build faster.
Setting up a maven project :
Go to File -- > Import
Select ‘Maven Projects’ under ‘General’ in the pop up window and click on next.
Browse the Root Directory and click on OK.
The directory selected should have a valid pom.xml
Click on Finish.
Hey... its really good. i forget everything but must say maven is best thing we learn from monaco :)
ReplyDeletei might have some more documents for maven projects setup....
ReplyDeleteHey Anurag, why don't you add more information if you have? That would be a good idea.
ReplyDelete