I have installed Maven 3.0.4 and now want to run already created java project in eclipse 3.3 using Maven. For this, I added eclipse maven plugin and then enabled option "Maven -> Enable Dependency Management" for the project. This action created pom.xml in the same project.
To add test files I added source directory.
Now I am very confused as to how can we add jar files in this maven project, although I tried using dependencies but got error of "missing artifacts" while compiling.
For eg., one of the jar file in $projectDir/lib folder is "junit-4.8.2.jar"
I am using it as "import org.junit.Test;"
So should we write:
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit</artifactId>...any unique name
<version>4.8.2</version>
</dependency>
If yes, then what else we have to do to let maven pick this jar file while compiling. Also, I am not clear about use of "local repository" which got created in my user account/.m2 folder.
Could anyone please advise..Thanks !!!