Maven項目文檔
本教學將教你如何一步到位創建應用程序的文檔。因此,讓我們開始,到 C:/MVN 創建java應用程序consumerBanking。 OpenconsumerBanking文件夾,然後執行以下命令mvn命令。
C:MVN>mvn site
Maven將開始構建該項目。
[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------- [INFO] Building consumerBanking [INFO] task-segment: [site] [INFO] ------------------------------------------------------------------- [INFO] [site:site {execution: default-site}] [INFO] artifact org.apache.maven.skins:maven-default-skin: checking for updates from central [INFO] Generating "About" report. [INFO] Generating "Issue Tracking" report. [INFO] Generating "Project Team" report. [INFO] Generating "Dependencies" report. [INFO] Generating "Continuous Integration" report. [INFO] Generating "Source Repository" report. [INFO] Generating "Project License" report. [INFO] Generating "Mailing Lists" report. [INFO] Generating "Plugin Management" report. [INFO] Generating "Project Summary" report. [INFO] ------------------------------------------------------------------- [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------- [INFO] Total time: 16 seconds [INFO] Finished at: Wed Jul 11 18:11:18 IST 2012 [INFO] Final Memory: 23M/148M [INFO] -------------------------------------------------------------------
就是這樣。你的項目文件已準備就緒。 Maven有目標目錄中創建一個網站。
打開 C:MVNconsumerBanking argetsite 文件夾。點擊index.htmll看到文檔。
Maven會使用稱為Doxia一個文件處理引擎,它會讀取多個源格式轉換為通用文檔模型的文檔。要編寫你的項目文檔,可以在以下幾個常用的格式,這是由Doxia解析編寫內容。
格式名稱 | 描述 | 參考 |
---|---|---|
APT | A Plain Text document format | http://maven.apache.org/doxia/format.htmll |
XDoc | A Maven 1.x documentation format | http://jakarta.apache.org/site/jakarta-site2.htmll |
FML | Used for FAQ documents | http://maven.apache.org/doxia/references/fml-format.htmll |
XHTML | Extensible HTML | http://en.wikipedia.org/wiki/XHTML |