Reputation: 905
I want to build my project with Maven. How do I do that?
Maven is installed,
the project is called Sertsu1
it contains a pom.xml-file
What must be entered in the command line to start building?
Upvotes: 3
Views: 7105
Reputation: 18218
If your project is organized as Maven expects, e.g. your source code is in the src\main\java
directory you can run
mvn package
to just build your jar
mvn install
to install it in your local Maven repository
mvn clean
to remove a previous build
Beware that you won't go very far with Maven without reading about it. You can start with this book.
Upvotes: 8
Reputation: 68942
In order to create an artifact (jar-file) you need to invoke
mvn package
This is very basic and you should take your time to read the suggested manuals before using maven.
Upvotes: 7
Reputation: 114757
Navigate to the folder that contains the pom.xml
and enter
mvn package
(for a quick result)
Your machine needs to be connected to the internet as maven will download a lot of files from public repositories.
Upvotes: 6