Maven
A build automation and dependency management tool for Java.
- Java Code
- Dependencies
- Special Lego blocks that other people made, which you need for your castle.
- like Spring Boot, PostgreSQL Driver, Redisson, …
- pom.xml (Project Object Model)
- Tells Maven exactly which special Lego blocks to download from the internet.
- Define how to put the final castle together.
mvn clean package
- Maven reads the pom.xml.
- Downloads the dependencies.
- Compiles your code.
- Squishes it all into one runnable
.jar file.
- By default, Maven names the jar based on
<artifactId> and <version>
- Added
<finalName>app</finalName> into the <build> section of the pom.xml to name the jar.