diff --git a/j2ee/src/main/org/apache/maven/j2ee/WarValidator.java b/j2ee/src/main/org/apache/maven/j2ee/WarValidator.java
index cfdcb1c3..17deb98b 100644
--- a/j2ee/src/main/org/apache/maven/j2ee/WarValidator.java
+++ b/j2ee/src/main/org/apache/maven/j2ee/WarValidator.java
@@ -22,8 +22,6 @@ import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
-import org.apache.tools.ant.BuildException;
-
import org.apache.maven.j2ee.war.FormLoginConfig;
/**
@@ -45,8 +43,7 @@ import org.apache.maven.j2ee.war.FormLoginConfig;
* > element must exist in the war file
*
* @author dIon Gillard
- * @version $Id: WarValidator.java,v 1.2 2004/03/02 15:05:55 evenisse Exp $
- * @task Replace the use of BuildException
+ * @version $Id: WarValidator.java,v 1.3 2004/03/29 00:39:25 dion Exp $
*/
public class WarValidator
{
@@ -87,9 +84,9 @@ public class WarValidator
/**
* 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 @@ public class WarValidator
validate();
if (getStatus().isError() && isFailOnError())
{
- throw new BuildException("Errors occurred during validation. "
+ throw new IllegalStateException("Errors occurred during validation. "
+ "Messages should have been provided");
}
}
diff --git a/j2ee/src/test/org/apache/maven/j2ee/WarValidatorTest.java b/j2ee/src/test/org/apache/maven/j2ee/WarValidatorTest.java
index 10d7f0f7..1891c895 100644
--- a/j2ee/src/test/org/apache/maven/j2ee/WarValidatorTest.java
+++ b/j2ee/src/test/org/apache/maven/j2ee/WarValidatorTest.java
@@ -55,7 +55,6 @@ package org.apache.maven.j2ee;
*/
import junit.framework.TestCase;
-import org.apache.tools.ant.BuildException;
import org.apache.maven.TestConstants;
@@ -63,7 +62,7 @@ import org.apache.maven.TestConstants;
* Unit test for WarValidator.
*
* @author dIon Gillard
- * @version $Id: WarValidatorTest.java,v 1.1 2003/01/24 03:45:22 jvanzyl Exp $
+ * @version $Id: WarValidatorTest.java,v 1.2 2004/03/29 00:39:25 dion Exp $
*/
public class WarValidatorTest extends TestCase
{
@@ -148,7 +147,7 @@ public class WarValidatorTest extends TestCase
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 @@ public class WarValidatorTest extends TestCase
+ "(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");