Apache Maven is a powerful build automation and dependency management tool widely used in Java, Selenium, TestNG, Spring Boot, and CI/CD projects.
Apache Maven is a project management and build automation tool that helps developers manage project builds, dependencies, documentation, and releases.
mvn -version
project-name ├── src │ ├── main │ │ ├── java │ │ └── resources │ └── test │ ├── java │ └── resources ├── pom.xml └── target
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.prakura</groupId> <artifactId>automation</artifactId> <version>1.0</version> </project>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.20.0</version>
</dependency>
</dependencies>
mvn clean install
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.2.5</version> </plugin>
<profiles>
<profile>
<id>qa</id>
</profile>
</profiles>
mvn test -Pqa
mvn test
mvn clean test