On debian 8:
apt-get install mvn # this will install maven 3.0
- mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
it basically mkdir -p src/main/java/ ( put your java file here), create an pom.xml
2. mvn compile #install clean
Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean.
Where/How to find correct packages dependency:
It is a little bit surprise to find that there is no command/options ( just like apt-cache search … ) to search those packages in the maven repos, so we have to depend on the following sites to find those
Why no make in java world?
Those mvn command likes similar to c/c++ make system, what is the reason java world do not use make system?
The difference between:
javac Main.java javac This.java javac That.java javac Other.java
javac Main.java This.java That.java Other.java
is night and day.