Skip to content

Introduction to Maven and Building MemeforceHunt

Benjamin Marwell edited this page Apr 26, 2020 · 2 revisions

What is Maven?

Maven is a tool which can manage modules of a software and knows how to compile and combine those to form a Java application or other applications which run on a Java virtual machine (such as Kotlin, Groovy, Scala and others).

You can recognize Maven by finding a pom.xml file. Usually the source code for the app is in a folder src/main/java, while test sources are in src/test/java. Maven follows strict conventions, but it can be configure to behave differently. Usually the conventions are very good — configuring often shows a flaw in the software. Thus, stick to the conventions as much as possible.

When do I use/choose maven?

You use Maven each time you need to organize your software in modules, want to execute tests, create a workflow, or even handle dependencies. Think of build management. It handles dependencies and knows how to download and how to use them.

All Java IDEs will recognize such projects.

How do I use Maven?

To check if the program comiles

You can use maven by using either a locally installed maven (executing mvn) or by using the optionally bundled mvnw (Maven Wrapper) script. MemeforceHunt ships a mvnw script. Maven itself needs Java to run.