how to build with maven code example
Example: mvn build project
# one of the following
# compiles java classes
mvn compile
# creates a jar in target folder
mavn package
# creates a jar in target folder and adds to your local .m2 repository
mvn install