Maven
1.
Archetype is a Maven project templating toolkit. An archetype is defined as an original pattern or model from which all other things of the same kind are made.
find the dependency
First, we need to know what the groupId, artifactId, and version are for log4j. We can browse ibiblio and look for it, or use Google to help by searching for “site:www.ibiblio.org maven2 log4j”. The search shows a directory called /maven2/log4j/log4j (or /pub/packages/maven2/log4j/log4j). In that directory is a file called maven-metadata.xml.lifecycle and phase( goal )
list the goal which attached the related phase
$ mvn help:describe -Dcmd=clean
[INFO] ‘clean’ is a lifecycle with the following phases:- pre-clean: Not defined
- clean: org.apache.maven.plugins:maven-clean-plugin:2.5:clean
- post-clean: Not defined
$ mvn help:describe -Dcmd=deploy
[INFO] ‘deploy’ is a phase corresponding to this plugin:
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
It is a part of the lifecycle for the POM packaging ‘jar’. This lifecycle includes the following phases:
* validate: Not defined
* initialize: Not defined
* generate-sources: Not defined
* process-sources: Not defined
* generate-resources: Not defined
* process-resources: org.apache.maven.plugins:maven-resources-plugin:2.6:resources
* compile: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
* process-classes: Not defined
* generate-test-sources: Not defined
* process-test-sources: Not defined
* generate-test-resources: Not defined
* process-test-resources: org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
* test-compile: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile
* process-test-classes: Not defined
* test: org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test
* prepare-package: Not defined
* package: org.apache.maven.plugins:maven-jar-plugin:2.4:jar
* pre-integration-test: Not defined
* integration-test: Not defined
* post-integration-test: Not defined
* verify: Not defined
* install: org.apache.maven.plugins:maven-install-plugin:2.4:install
* deploy: org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
http://www.codetab.org/apache-maven-tutorial/maven-lifecycle-and-goals/#
-
Easiest way to know the available parameters for a goal is to run plugin help goal.
$ mvn compiler:help -Dgoal=compile -Ddetail
It will list the available parameters for compile goal of compiler.
But it will not show the default value of the parameters and to know the available parameters and also, the default value for each parameter, run help:describe goal of Maven Help plugin (maven-help-plugin).
$ mvn help:describe -Dplugin=compiler -Dmojo=compile -Ddetail
Note that maven-help-plugins uses -Dmojo for goal, instead of -Dgoal,
maven plugins
http://maven.apache.org/plugins/index.htmlconfig plugins
https://maven.apache.org/guides/mini/guide-configuring-plugins.html