简体   繁体   中英

Maven Site Lifecycle

So every bit of documentation I've been able to find about Maven and it's lifecycle says that site only has 4 phases:

pre-site
site
post-site
site-deploy

However, in my pom.xml I have an ant script that gets run on the validate phase. According to the "site lifecycle", validate isn't a phase, but my ant script gets run... twice! Not only that, it also compiles my source and runs tests (which takes FOREVER).

What gives, Maven? Your documentation doesn't match your runtime behavior.

Help?

Edit:

A plug-in, that explains it. Thanks, I'm using this reporting plugin:

<reporting>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-report-plugin</artifactId>
      <version>2.13</version>
    </plugin>
  </plugins>
</reporting>

I found this documentation on surefire report plug-in to be useful.

Some Maven plugins (like javadoc, for example) declare a 'forked lifecycle'. So, most likely, you have a plugin in your reporting configuration that demands a lifecycle that includes validate. If you are using an up-to-date copy of Maven (3.0.4), the -X option will include, amongst the thousands of lines of useless stuff, readable indications of this forking activity.

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