简体   繁体   中英

How generate documentation on maven?

I am new with Maven, and now I am trying to generate the project documentation. Until now, I find that I only need to run the command

mvn site

or

mvn clean site

and thats all this command will generate the folder site inside target folder, and does it but also should generate some files main is index.html and here its the problem, command doesn't generetate those files, only the folders

在此处输入图像描述

I will hope the file index.html looks like

在此处输入图像描述

and those folders have files, like images and files *.css, So I don't know if I need to do some steps before? Also If you can recommend me a tutorial or documentation about it, thanks

I found the correct way to do it, because the tutorial that I was following it isn't full descriptive, it is why I'm confused. But I found the guide of maven to do it. Check it here Creating a site . So I need to create the folder site inside src path, and this folder should contain file site.xml which relates the different components of the site, those could be developed in different document types, in the page there are some links to know how to do it. So this is mine site.xml

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <body>
        <menu name="Overview">
            <item name="Introduction" href="index.html"/>
            <item name="Goals" href="plugin-info.html"/>
        </menu>
    </body>
</project>

And I use the xDoc type, so I create xdoc folder inside site, this contains all the files related in site.xml (index.xml and plgin-info.xml in example)

文件夹结构 site.xml 中的相关文件

so after that run the command mvn site and got this in targe\site

目标文件夹

地点

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM