We have a JBoss instance that is configured and started as part of an automated build process. One issue you have in such a setup is how to detect (and fail the build immediately) if there are failed deployments. The best approach I've been able to come up with so far is to have a separate log4j appender (with an ERROR threshold) for the URLDeploymentScanner category. The build process then checks and fails if anything was logged there prior to running any integration tests. This does seem like a bit of a hack, so I was wondering what solutions other people have come up with?