You're right Martin, but, as I explained in my first mail, the state build succeeds has also two states, depending on the stability of the product.

The stability of the product depends on the test cases, if every test case passes, the product is stable, otherwise, unstable. But the build process is successful in both cases because the code is successfully compiled and packaged.
Imagine the following scenario:

For some reason, the computer where the whole process is launched has lost it's Internet connection and, a test that depends on XML fails because the page where to retrieve the .xsd file cannot be reached. There is also a second test that is really broken. Both tests will fail but the build will succeed. When looking at the generated report, you'll see that one of the tests where really broken while the other failed due to the network problem. If the whole build was considered as a failure, no test report could be found, and, no information further than 2 Tests failed could be gathered.

The JAR won't be used anyway, but, at least, you have information on what happened.

Suppose now that, only the XML test fails, you know why and, you know that the JAR file is well done.

Thanks.


Martin Höller escribió:
On Friday 11 July 2008 Carlos Alonso wrote:
Now my problem is the following. I execute the install target, but, if
any test fails, I wouldn't like my repository to store the generated
artifact and, as you can imagine, the artifact is installed. How can I
deal with this?

I guess that's not easily possible, as there are only two states: "build succeeds" and "build fails". With the surefire parameter testFailureIgnore, you managed to have a successfull build even if some tests fail. But the install plugin doesn't know anything about the failed tests and just sees a succeeded build and thus, installes the JAR.

The question is: why would you want the build to succeed if the tests fail? If it fails, there is no point in using the broken JAR, anyway.

hth,
- martin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to