How to add html content to maven site generated by maven site plugin?

I am using the maven site plugin to create a project site. This creates a default site and can be viewed under the name src / target / index.html. I need to add content to the index. How can I do that?

While reading the maven documentation, I created an index.apt in the src / site folder. How do I get the content of this file in the index.html page in the target folder?

+3


source to share


2 answers


I am using Maven 3.3.9
My solution was to add an index.html file under $ {baseDir} / src / site / resources.
Then run:

mvn clean site

      



Your index.html file should replace the default.

+2


source


You just need to run mvn clean site

.



+1


source







All Articles