From: <juh...@us...> - 2001-03-24 21:14:16
|
User: juhalindfors Date: 01/03/24 13:14:14 Modified: src/main/org/jboss/verifier Main.java Log: Return codes added for the standalone verifier. Return -1: error in executing the verifier Return 0: ejb-jar was verified Return 1: ejb-jar caused warnings in the verifier Revision Changes Path 1.5 +13 -3 jboss/src/main/org/jboss/verifier/Main.java Index: Main.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/verifier/Main.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Main.java 2001/01/03 08:28:41 1.4 +++ Main.java 2001/03/24 21:14:14 1.5 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * This package and its source code is available at www.jboss.org - * $Id: Main.java,v 1.4 2001/01/03 08:28:41 tobias Exp $ + * $Id: Main.java,v 1.5 2001/03/24 21:14:14 juhalindfors Exp $ * * You can reach the author by sending email to jpl...@he.... */ @@ -46,11 +46,16 @@ * @see << OTHER RELATED CLASSES >> * * @author Juha Lindfors - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @since JDK 1.3 */ public class Main { + public final static int OK = 0; + public final static int WARNING = 1; + + static int returnCode = OK; + /** * Starts the application. * @@ -77,16 +82,21 @@ System.err.println("Exception: " + e); System.err.println("Message: " + e.getMessage()); e.printStackTrace(); + + System.exit(-1); } + + System.exit(returnCode); } - } class Listener implements VerificationListener { public void specViolation(VerificationEvent event) { System.out.println(event.getVerbose()); + + Main.returnCode = Main.WARNING; } public void beanChecked(VerificationEvent event) { |