There are two issues that you would have faced till now in doing Selenium Development
- In Parallel Development, managing the dependency on Selenium JARs is a pain. Either we’ve to commit them into GITHUB or need to share them in a standard path.
- For every new selenium project in Eclipse, Download and Add Selenium JARs.
Maven Solves above two problems very well.
- You are no longer required to download JAR files (transitive dependency management).
- Uses single shared repository for all our projects for sharing jars.
What is Maven?
Maven is a build automation tool. Without eclipse, we can compile our code by auto dependency resolution to get ARTIFACT (component) generated.
What are other choices?
ANT, Ivy, Gradle etc.
ANT vs Maven?
ANT is mainly a scripting tool and requires lot of coding and configuring tasks.
MAVEN is a full fledged build tool. Uses Convention over configuration.
It is just a 4 Step process.
- Download Maven Binary Distribution.
- Unzip the downloaded file.
- Add bin directory of maven to PATH environment variable.
- Set JAVA_HOME environment variable is set to point to JDK installation directory and MAVEN_HOME to point to Maven unzipped directory.
We are all set. To verify all’s well, open command prompt and run ‘mvn -version’ command.