dion 2004/03/28 16:39:25 Modified: j2ee/src/main/org/apache/maven/j2ee WarValidator.java j2ee/src/test/org/apache/maven/j2ee WarValidatorTest.java Log: Remove use of BuildException and dependency on Ant Revision Changes Path 1.3 +4 -7 maven-plugins/j2ee/src/main/org/apache/maven/j2ee/WarValidator.java Index: WarValidator.java =================================================================== RCS file: /home/cvs/maven-plugins/j2ee/src/main/org/apache/maven/j2ee/WarValidator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- WarValidator.java 2 Mar 2004 15:05:55 -0000 1.2 +++ WarValidator.java 29 Mar 2004 00:39:25 -0000 1.3 @@ -22,8 +22,6 @@ import java.util.Iterator; import java.util.Map; -import org.apache.tools.ant.BuildException; - import org.apache.maven.j2ee.war.FormLoginConfig; /** @@ -46,7 +44,6 @@ * </ol> * @author dIon Gillard * @version $Id$ - * @task Replace the use of BuildException */ public class WarValidator { @@ -87,9 +84,9 @@ /** * Perform the validation. * - * @throws BuildException when any error occurs + * @throws IllegalStateException when any error occurs */ - public void execute() throws BuildException + public void execute() { if (getWarFileName() == null) { @@ -98,7 +95,7 @@ validate(); if (getStatus().isError() && isFailOnError()) { - throw new BuildException("Errors occurred during validation. " + throw new IllegalStateException("Errors occurred during validation. " + "Messages should have been provided"); } } 1.2 +3 -4 maven-plugins/j2ee/src/test/org/apache/maven/j2ee/WarValidatorTest.java Index: WarValidatorTest.java =================================================================== RCS file: /home/cvs/maven-plugins/j2ee/src/test/org/apache/maven/j2ee/WarValidatorTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WarValidatorTest.java 24 Jan 2003 03:45:22 -0000 1.1 +++ WarValidatorTest.java 29 Mar 2004 00:39:25 -0000 1.2 @@ -55,7 +55,6 @@ */ import junit.framework.TestCase; -import org.apache.tools.ant.BuildException; import org.apache.maven.TestConstants; @@ -148,7 +147,7 @@ fail("Empty war file (with no META-INF, or WEB-INF/web.xml) has" + " succeeded"); } - catch (BuildException be) + catch (IllegalStateException e) { // this is the expected behaviour } @@ -171,7 +170,7 @@ + "(with no META-INF, or WEB-INF/web.xml)", validator.getStatus().isError()); } - catch (BuildException be) + catch (IllegalStateException e) { fail("Empty war file (with no META-INF, or WEB-INF/web.xml) failed" + " the build process with failOnError=false");
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]