Maven Tutorial
Selected Reading
- Maven - Discussion
- Maven - Useful Resources
- Maven - Quick Guide
- Maven - Questions and Answers
- Maven - IntelliJ IDEA
- Maven - NetBeans
- Maven - Eclipse IDE
- Maven - Web Application
- Maven - Deployment Automation
- Maven - Manage Dependencies
- Maven - Build Automation
- Maven - Snapshots
- Maven - Project Templates
- Maven - Project Documents
- Maven - External Dependencies
- Maven - Build & Test Project
- Maven - Creating Project
- Maven - Plug-ins
- Maven - Repositories
- Maven - Build Profiles
- Maven - Build Life Cycle
- Maven - POM
- Maven - Environment Setup
- Maven - Overview
- Maven - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Maven - Project Documents
Maven - Project Documents
This tutorial will teach you how to create documentation of the apppcation in one go. So let s start, go to C:/MVN directory where you had created your java consumerBanking apppcation using the examples given in the previous chapters. Open consumerBanking folder and execute the following mvn command.
Update, the pom.xml in C:MVNconsumerBanking folder as shown below.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.companyname.bank</groupId> <artifactId>consumerBanking</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>consumerBanking</name> <url>http://maven.apache.org</url> <properties> <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.7</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>2.9</version> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> </project>
C:MVNconsumerBanking>mvn site
Maven will start building the project.
[INFO] Scanning for projects... [INFO] [INFO] ----------------< com.companyname.bank:consumerBanking >---------------- [INFO] Building consumerBanking 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-site-plugin:3.7:site (default-site) @ consumerBanking --- [WARNING] Input file encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Relativizing decoration pnks with respect to locapzed project URL: http://maven.apache.org [INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.2 skin. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.850 s [INFO] Finished at: 2021-12-13T17:49:56+05:30 [INFO] ------------------------------------------------------------------------
Your project documentation is now ready. Maven has created a site within the target directory.
Open C:MVNconsumerBanking argetsite folder. Cpck on index.html to see the documentation.
Maven creates the documentation using a documentation-processing engine called
which reads multiple source formats into a common document model. To write documentation for your project, you can write your content in a following few commonly used formats which are parsed by Doxia.Format Name | Description | Reference |
---|---|---|
XDoc | A Maven 1.x documentation format | |
FML | Used for FAQ documents |