How to generate maven site automatically during a build

186 views Asked by At

I know I can call mvn site-deploy individually, but how can I kick off a site deploy during a build of mvn clean deploy?

1

There are 1 answers

3
mystarrocks On BEST ANSWER

Add the site plugin to the pom's <build> with an appropriate goal to run during a phase of your choice.

<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <executions>
    <execution>
      <id>site deploy</id>
      <phase>your_choice_of_phase</phase>
      <goals>
        <goal>site</goal>
        <goal>deploy</goal>
      </goals>
    </execution>
  </executions>
</plugin>