简体   繁体   English

Maven 站点生命周期

[英]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:因此,我能够找到的关于 Maven 及其生命周期的所有文档都表明该站点只有 4 个阶段:

pre-site
site
post-site
site-deploy

However, in my pom.xml I have an ant script that gets run on the validate phase.但是,在我的 pom.xml 中,我有一个在验证阶段运行的 ant 脚本。 According to the "site lifecycle", validate isn't a phase, but my ant script gets run... twice!根据“站点生命周期”,验证不是一个阶段,但我的 ant 脚本会运行......两次! Not only that, it also compiles my source and runs tests (which takes FOREVER).不仅如此,它还编译我的源代码并运行测试(这需要永远)。

What gives, Maven?什么给了,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.我发现 这个关于surefire报告插件的文档很有用。

Some Maven plugins (like javadoc, for example) declare a 'forked lifecycle'.一些 Maven 插件(例如 javadoc)声明了一个“分叉的生命周期”。 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.如果您使用的是 Maven (3.0.4) 的最新副本,则 -X 选项将在数千行无用的内容中包含此分叉活动的可读指示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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