Maven Tutorial - Maven Commands








We can use Maven to create documentation of the application in command.

c:\mvn_test\xmlFileEditor>mvn site
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xmlFileEditor 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-site-plugin:3.3:site (default-site) @ xmlFileEditor ---
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-exec/1.1/maven-reporting-exec-1.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-exec/1.1/maven-reporting-exec-1.1.pom (11 KB at 11.4 KB/sec)
Downloading other if necessary
...
...
[WARNING] Report plugin org.apache.maven.plugins:maven-project-info-reports-plugin has an empty version.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/skins/maven-default-skin/1.0/maven-default-skin-1.0.jar (8 KB at 84.9 KB/sec)
Downloading other if necessary
...
...
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating "About" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Plugin Management" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Distribution Management" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Dependency Information" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Source Repository" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Mailing Lists" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Issue Tracking" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Continuous Integration" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project Plugins" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project License" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project Team" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Project Summary" report    --- maven-project-info-reports-plugin:2.7
[INFO] Generating "Dependencies" report    --- maven-project-info-reports-plugin:2.7
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:24 min
[INFO] Finished at: 2014-11-22T09:34:18-08:00
[INFO] Final Memory: 28M/369M
[INFO] ------------------------------------------------------------------------

c:\mvn_test\xmlFileEditor>

Your project documentation is ready. Maven has created a site within target directory.

null

Open c:\mvn_test\xmlFileEditor\target\site folder. Click on index.html to see the documentation.

null