diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/ConfigurationException.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/ConfigurationException.java deleted file mode 100644 index dd13791..0000000 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/ConfigurationException.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.maven.api.plugin.testing; - -/** - * ConfigurationException - * - * @author jesse - */ -public class ConfigurationException extends Exception { - /** serialVersionUID */ - static final long serialVersionUID = -6180939638742159065L; - - /** - * @param message The detailed message. - */ - public ConfigurationException(String message) { - super(message); - } - - /** - * @param cause The detailed cause. - */ - public ConfigurationException(Throwable cause) { - super(cause); - } - - /** - * @param message The detailed message. - * @param cause The detailed cause. - */ - public ConfigurationException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java index 9e96ab5..30ab673 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java @@ -560,9 +560,7 @@ public static XmlNode extractPluginConfiguration(String artifactId, Xpp3Dom pomD .filter(e -> e.getChild("artifactId").getValue().equals(artifactId)) .findFirst() .flatMap(buildElement -> child(buildElement, "configuration")) - .orElseThrow( - () -> new ConfigurationException("Cannot find a configuration element for a plugin with an " - + "artifactId of " + artifactId + ".")); + .orElse(Xpp3DomBuilder.build(new StringReader(""))); return pluginConfigurationElement.getDom(); }