DevOps engineers and software developers always building a software project that contains typically dependencies, running tests, putting jars on a classpath and packaging compiled code into deployable artifacts such as JAR and WAR files, and deploying these artifacts to an application server such as WildFly or repository such as Apache Archiva.
Apache Maven automates these type of tasks and the code construction is better as packaging the code of a software team.
Why to use Apache Maven?
The key features of Apache Maven are the following:
- dependency management
- plugins management
- central repository system
What is POM (Project Object Model)?
The configuration of a Maven project in IntelliJ IDEA could be completed via pom.xml that is represented in the project and could be usually configured by DevOps engineer or software developer. POM (Project Object Model) describes exactly what the project is, what dependencies manages and make configurations for plugins management in order to build a successful software product or software.
The basic structure of a POM file is the following:
<project> <modelVersion>4.0.0</modelVersion> <groupId>dev.opendevops</groupId> <artifactId>dev.opendevops</artifactId> <packaging>jar</packaging> <version>0.0.1-SNAPSHOT</version> <name>dev.opendevops</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> ... </plugin> </plugins> </build> </project>