001package org.apache.maven.plugin;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *  http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import org.apache.maven.plugin.descriptor.PluginDescriptor;
023import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
024import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
025import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
026
027/**
028 * @author Jason van Zyl
029 */
030public class PluginConfigurationException
031    extends Exception
032{
033    private PluginDescriptor pluginDescriptor;
034
035    private String originalMessage;
036
037    public PluginConfigurationException( PluginDescriptor pluginDescriptor, String originalMessage )
038    {
039        super( originalMessage );
040        this.pluginDescriptor = pluginDescriptor;
041        this.originalMessage = originalMessage;
042    }
043
044    public PluginConfigurationException( PluginDescriptor pluginDescriptor, String originalMessage, Throwable cause )
045    {
046        super( originalMessage, cause );
047        this.pluginDescriptor = pluginDescriptor;
048        this.originalMessage = originalMessage;
049    }
050
051    public PluginConfigurationException( PluginDescriptor pluginDescriptor, String originalMessage,
052                                         ExpressionEvaluationException cause )
053    {
054        super( originalMessage, cause );
055        this.pluginDescriptor = pluginDescriptor;
056        this.originalMessage = originalMessage;
057    }
058
059    public PluginConfigurationException( PluginDescriptor pluginDescriptor, String originalMessage,
060                                         ComponentConfigurationException cause )
061    {
062        super( originalMessage, cause );
063        this.pluginDescriptor = pluginDescriptor;
064        this.originalMessage = originalMessage;
065    }
066
067    public PluginConfigurationException( PluginDescriptor pluginDescriptor, String originalMessage,
068                                         ComponentLookupException cause )
069    {
070        super( originalMessage, cause );
071        this.pluginDescriptor = pluginDescriptor;
072        this.originalMessage = originalMessage;
073    }
074}