Mvn-site creates only css, images and Web-Inf folder

When I start the mvn site: run and go to localhost: 8080 I see only 3 folders:

  • CSS
  • Images
  • Web inf

How to get index.html file? or where should I create index.html?

pm.xml at site/

<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/xsd/maven-4.0.0.xsd">

<properties>
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <port>9000</port>
          <tempWebappDirectory>
            ${basedir}/src/documentation/src/site
          </tempWebappDirectory>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
+3
source share
1 answer

Perhaps something like the following project structure might work for you:

<project>
   +- src/
      +- site/
          +- apt/
          |   +- apt-files 
          |   +- index.apt            <-- index file
          |    
          |- fml/                     <-- optional ... 
          |   +- fml-files
          |
          |- ....
          |   +- ...
          |
          |- resources/
          |   +- css/
          |   +- images/
          |    
          `- site.xml                 <-- this must be configuered appropriately

Also configure the following for deployment:

  <distributionManagement>
     <site>
       <id>site</id>
       <url>http://host.coom/site</url>
     </site>
  </distributionManagement>
0
source

All Articles