diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/FailureResponse.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/FailureResponse.java deleted file mode 100755 index c649c5096a..0000000000 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/FailureResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.apache.maven.plugin; - -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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. - */ - -/** - * @author Jason van Zyl - * @version $Id$ - */ -public abstract class FailureResponse -{ - protected Object source; - - protected FailureResponse( Object source ) - { - this.source = source; - } - - public abstract String shortMessage(); - - public abstract String longMessage(); - - public Object getSource() - { - return source; - } -} diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionRequest.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionRequest.java deleted file mode 100755 index 2174554846..0000000000 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionRequest.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.apache.maven.plugin; - -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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. - */ - -import java.util.Map; - -/** - * @author Jason van Zyl - * @version $Id$ - * @deprecated - */ -public class MojoExecutionRequest -{ - private Map parameters; - - public MojoExecutionRequest( Map parameters ) - { - this.parameters = parameters; - } - - public Map getParameters() - { - return parameters; - } - - public void setParameters( Map parameters ) - { - this.parameters = parameters; - } - - public Object getParameter( String key ) - { - return parameters.get( key ); - } -} diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionResponse.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionResponse.java deleted file mode 100755 index 83d8726b64..0000000000 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoExecutionResponse.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.apache.maven.plugin; - -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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. - */ - -/** - * @deprecated - * @author Jason van Zyl - * @version $Id$ - */ -public class MojoExecutionResponse -{ - private FailureResponse failureResponse = null; - - public boolean isExecutionFailure() - { - return failureResponse != null; - } - - public void setExecutionFailure( FailureResponse failureResponse ) - { - this.failureResponse = failureResponse; - } - - /** - * @deprecated please use {@link #setExecutionFailure(FailureResponse)} as there is no need to set executionFailure to false if there is a failure response - */ - public void setExecutionFailure( boolean executionFailure, FailureResponse failureResponse ) - { - if ( executionFailure == false ) - { - throw new IllegalArgumentException( "executionFailure should be true when passing a failureResponse" ); - } - - setExecutionFailure( failureResponse ); - } - - public FailureResponse getFailureResponse() - { - return failureResponse; - } -} diff --git a/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/MarmaladeMojoFailureResponse.java b/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/MarmaladeMojoFailureResponse.java deleted file mode 100644 index bddba9e4ac..0000000000 --- a/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/MarmaladeMojoFailureResponse.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.apache.maven.script.marmalade; - -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed 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. - */ - -import org.apache.maven.plugin.FailureResponse; -import org.codehaus.marmalade.runtime.MarmaladeExecutionException; - -import java.io.PrintWriter; -import java.io.StringWriter; - -/** - * @author jdcasey Created on Feb 8, 2005 - */ -public class MarmaladeMojoFailureResponse - extends FailureResponse -{ - - private final String scriptLocation; - - private final MarmaladeExecutionException error; - - public MarmaladeMojoFailureResponse( String scriptLocation, MarmaladeExecutionException error ) - { - super( scriptLocation ); - - this.scriptLocation = scriptLocation; - this.error = error; - } - - public String shortMessage() - { - StringBuffer buffer = new StringBuffer(); - buffer.append( "Script: " ).append( scriptLocation ).append( " failed to execute." ); - buffer.append( "\nError: " ).append( error.getLocalizedMessage() ); - return buffer.toString(); - } - - public String longMessage() - { - StringBuffer buffer = new StringBuffer(); - buffer.append( "Script: " ).append( scriptLocation ).append( " failed to execute." ); - buffer.append( "\nError:\n" ); - - StringWriter sWriter = new StringWriter(); - PrintWriter pWriter = new PrintWriter( sWriter ); - - error.printStackTrace( pWriter ); - - buffer.append( sWriter.toString() ); - - pWriter.close(); - - return buffer.toString(); - } - -} \ No newline at end of file