Hi Doug,
I have achieved what i wanted.
I had to modify the CC source, but it was a very minor change.
I have modified the Maven2Builder class to run all the goals in the goal set
before failing the build.
So i now have
<schedule interval="600">
<maven2 mvnscript="&mavenExec;"
pomfile="&cruiseProjects;\Phoenix-Parent\pom.xml"
goal="-Pbuild,tomcat55,jdk15,scm clean|-Pbuild,tomcat55,jdk15
install|-Pbuild,tomcat55,jdk15,site-generation site:site site:deploy" />
<pause starttime="2200" endtime="0600" />
</schedule>
This means that all 3 of the maven "runs" will be executed before CC fails
the build.
If you are intested the modification required is just to comment out a few
lines.
182-184 Maven2Builder.java
if (buildLogElement.getAttribute("error") != null) {
break;
}
This just means that we don't brealk out of the goalSet loop until all goals
have been executed.
Hope this is of some use.
Cheers
Jon
"Doug Douglass" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey Jon,
>
> Yes, we have a separate (Cruisecontrol) build to generate the maven site
> docs. It runs on a fixed schedule instead of being triggered by scm
> commits.
> For the site build, as you've seen, we do not fail the build if tests
> fail,
> we have separate builds for that.
>
> I do not know of a way to allow a build with failling tests to continue
> with
> site generation _and_ produce a build failure. That's why we have two
> separate builds, that and we don't need the site docs updated all the
> time.
> Note that we use Trac and it's Cruisecontrol plugin to report build status
> and present the build logs (very nice IMHO) so little/no need to go to the
> surefire logs on the CI server to diagnose failures.
>
> Just thinking out loud now...if you're using Cruisecontrol, you could try
> running your site:site goal in a separate maven after your tests during
> the
> same build (i.e., something like "clean scm:update|test| -
> Dmaven.test.failure.ignore=true site:site" as the goal attribute value in
> your CC project config)...oooppps, but that won't fail your build since
> the
> site:site will return success...DOH
>
> Maybe file a JIRA for the surefire plugin to add a param to continue on
> test
> failure but ultimately fail the build? Or maybe write a little plugin
> linked
> to the verify phase that inspects the surefire reports for any failures
> and
> fails the build?
>
> HTH,
> Doug
>
> On 8/21/06, Jon SlinnHawkins <[EMAIL PROTECTED]> wrote:
>>
>> Hi Doug,
>>
>> I have an issue with Site generation and failing builds.
>> See my post earlier today [Using site:site to create reports on a failed
>> build]
>>
>> If you are using this profile when building sites, does that infer that
>> you
>> are using a separate mvn build to produce the site ?
>>
>> I want to be able to fail a build, but still continue to generate the
>> site
>> reports.
>>
>> Any help you can offer would be great.
>>
>> Thanks
>>
>> Jon
>>
>>
>> "Doug Douglass" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > FYI,
>> >
>> > As another option, we've got this profile in our CI servers
>> > settings.xml
>> > for
>> > use during site generating builds:
>> >
>> > <profiles>
>> > <profile>
>> > <id>site-generation</id>
>> > <properties>
>> > <maven.test.failure.ignore>true</maven.test.failure.ignore>
>> > </properties>
>> > </profile>
>> > </profiles>
>> >
>> >
>> > On 8/18/06, Wendy Smoak <[EMAIL PROTECTED]> wrote:
>> >>
>> >> On 8/18/06, Max Cooper <[EMAIL PROTECTED]> wrote:
>> >>
>> >> > This will set maven.test.skip to true, as long as you don't set it
>> >> > on
>> >> > the command line. The nice part about this technique is that it DOES
>> >> > allow you to override it on the command line if you want to.
>> >>
>> >> Thanks, Max. I added your tip to the wiki with a link to this thread.
>> >> Feel free to edit the page-- ask for access on the dev list if you
>> >> need it.
>> >>
>> >> http://docs.codehaus.org/display/MAVENUSER/Surefire+Plugin
>> >>
>> >> --
>> >> Wendy
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]