11.12. Maven project documentation

发布时间 :2025-10-25 12:23:16 UTC      

In this section, we focus on how to create Maven project documents.

For example, we create a consumerBanking project under the C:/MVN directory, and Maven uses the following command to quickly create a java project:

mvn archetype:generate -DgroupId=com.companyname.bank -DartifactId=consumerBanking -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Modify the pom.xml to add the following configuration (if not available):

<project>...<build><pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-site-plugin</artifactId><version>3.3</version></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-project-info-reports-plugin</artifactId><version>2.7</version></plugin></plugins></pluginManagement></build>...</project>
不然运行mvn site 命令时出现 **java.lang.NoClassDefFoundError:
org/apache/maven/doxia/siterenderer/DocumentContent** 的问题,
这是由于 maven-site-plugin 版本过低,升级到 3.3+ 即可。

Open the consumerBanking folder and execute the following mvn command.

C:\MVN\consumerBanking> mvn site

Maven begins to generate documentation:

[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] -------------------------------------------------------------------

image0

打开 C:MVNconsumerBankingtargetsite 文件夹。点击 index.html 就可以看到文档了。

image1

Maven uses a file named Doxia Document processing engine to create documents, which can read various formats of source code into a common document model. To document your project, you can write the content in the following common formats that can be converted by Doxia.

Format name

Description

Referenc

Apt

Plain text document format

http://maven.apache.o rg/doxia/references/a pt-format.html

Xdoc

A document format for Maven 1.x

http://jakarta.apache .org/site/jakarta-sit e2.html

FML

FAQ documentation is applicable

http://maven.apache.o rg/doxia/references/f ml-format.html

XHTML

Extensible HTML documents

http://en.wikipedia.o rg/wiki/XHTML

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.