diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java index d8c836b8..fce08966 100644 --- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java +++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java @@ -37,6 +37,7 @@ import org.apache.maven.plugin.LegacySupport; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.testing.AbstractMojoTestCase; import org.apache.maven.plugin.testing.stubs.MavenProjectStub; import org.apache.maven.plugins.javadoc.ProxyServer.AuthAsyncProxyServlet; @@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception { } } - /** - * @throws Exception if any - */ - public void testExceptions() throws Exception { - try { - Path testPom = unit.resolve("default-configuration/exception-test-plugin-config.xml"); - JavadocReport mojo = lookupMojo(testPom); - mojo.execute(); - - fail("Must throw exception."); - } catch (Exception e) { - assertTrue(true); - - try { - deleteDirectory(new File(getBasedir(), "exception")); - } catch (IOException ie) { - // nop - } - } - } - /** * Method to test the taglet artifact configuration * @@ -821,8 +801,6 @@ public void testHeaderFooter() throws Exception { } catch (MojoExecutionException e) { fail("Doesnt handle correctly newline for header or footer parameter"); } - - assertTrue(true); } /** @@ -838,8 +816,6 @@ public void testNewline() throws Exception { } catch (MojoExecutionException e) { fail("Doesn't handle correctly newline for string parameters. See options and packages files."); } - - assertTrue(true); } /** @@ -1167,8 +1143,7 @@ public void testStylesheetfile() throws Exception { try { mojo.execute(); fail(); - } catch (Exception e) { - assertTrue(true); + } catch (MojoExecutionException | MojoFailureException e) { } // stylesheet == java diff --git a/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml b/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml deleted file mode 100644 index d14f1f53..00000000 --- a/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - 4.0.0 - org.apache.maven.plugins.maven-javadoc-plugin.unit - exception-test - jar - 1.0-SNAPSHOT - 2006 - Maven Javadoc Plugin Exception Test - http://maven.apache.org - - exception-test - - - org.apache.maven.plugins - maven-javadoc-plugin - - - ${localRepository} - exception/.. + /target/test/unit/default-configuration/target/site/apidocs - false - false - protected - true - false - true - ISO-8859-1 - false - false - false - false - false - false - false - false - false - false - false - false - java - - - true - true - Maven Javadoc Plugin Exception Test 1.0-SNAPSHOT API - - http://java.sun.com/j2se/1.4.2/docs/api - - true - true - - - - -