using maven to build project code example
Example 1: maven create project from archetype command line
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false
Example 2: example of simple maven pom java
11 org.apache.maven.plugins maven-compiler-plugin 3.8.1