The only option you have is to run your project twice in your CI
environment:

1) mvn deploy
2) mvn site-deploy

No other options. But think again, are you sure that you want your site to
be built if there are JUnit/Checkstyle failures? If the build fails it has
to fail completely. No site, no deployment. The problem has to be fixed
immediately, without any site being deployed. That's how our projects are
organized normally.

—
Yegor Bugayenko, PMP®, SCEA



On Tue, Mar 22, 2011 at 3:48 PM, <[email protected]> wrote:

> Hi there,
>
> I'm in the process of migrating our Ant-based CI environment to Maven.
> After searching mailing lists and google for hours I'm near giving up but
> hope you are able to help.
>
> Actually we want to do quite simple things:
> 1) the buildserver should regularly deploy our project to a repository
> after running CheckStyle and JUnit
> 2) if either CheckStyle or JUnit fails the build should stop of course,
> BUT
> 3) if either CheckStyle or JUnit fails of course we need an HTML report
> for our developers to be uploaded to the build-results page of TeamCity.
>
>
> Now with  'mvn deploy'   I'm able to achieve 1+2  (I configured checkstyle
> to be part of the 'package' phase), with 'mvn site-deploy' number 3 is a
> no-brainer.
> But how to get all three at once in one go?
>
> Of course I don't want to establish two seperate build plans (which would
> run JUnit-Tests and Checkstyle twice -  also this would double our >40
> buildplans on the buildserver which I want to omit).
>
> Unfortunately also 'mvn deploy site-deploy' doesn't help me a lot. In the
> case of a failing JUnit-Tests the build is stopped and the site-target is
> not run => no HTML reports.
> What about: 'mvn site-deploy deploy' ? Doesn't work as well: now
> HTML-reports are created but the build isn't failing anymore.
>
> Then I also tried:  'mvn checkstyle:checkstyle deploy', but alas: the HTML
> report generated by maven is missing CSS files now and looks very very
> ugly. I don't dare to show it to any developer :)
>
>
> Isn't it a common use-case to deploy regularly but in the case of failing
> JUnit or Checkstyle to get a proper HTML report?
> Where is the fault in my thinking, how do other have integrated maven into
> their CI?
>
> Thanks a lot for your help
> Kind Regards
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to