Combined site/deploy goal for Maven -


When running a Maven build on the CI server, I generate the site for publishing documentation and reports, and to artwork I also apply the following goals to do this for snapshot repositories for the use of other projects:

  mvn clean site deploy  

This means that unit tests are being run twice , once for the site lifecycle And once to deploy life cycle. If I configure the site target to force the standard lifecycle, the tests are run twice, running the site goal always runs the test due to the @requiresDependencyResolution test annotation. If you are only building the site, but in the context of deploying it increases the time of construction for no profit.

I have an alternative solution in which sitemo (and the required guardian) to comment on a new plug-in and copy the @requiresDependencyResolution test .

This will generate the report without compelling the revised Mojo tests to run again, but I like a solution that does not include any hacking of the site plugin. One way to suppress the need is dependency Vacancies Annotation?

I wonder if this works - @requiresDependencyResolution test tag is actually Does not trigger tests built in - it should be one of the reports you have included. Generally, I suggest that to run site and building in different Maven firing in CI so that you can get a quick reaction on your production and publish it only on that site when it is successful.

Another option to run it MVN clean deployment site , and report-only for Mojo surefire-report-maven- Choose Plugin (This is usually the report which is running the test again). This will use the results of the previous test. Of course, another option is completely disabling this report because you probably get those results from another source like your CI server.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -