001package org.apache.maven.tools.plugin.extractor.model; 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 java.io.File; 023 024/** 025 * Exception when plugin metadata parsing occurred. 026 * 027 * @deprecated Scripting support for mojos is deprecated and is planned tp be removed in maven 4.0 028 */ 029@Deprecated 030public class PluginMetadataParseException 031 extends Exception 032{ 033 /** serialVersionUID */ 034 static final long serialVersionUID = 4022348153707995574L; 035 036 private final File metadataFile; 037 038 private final String originalMessage; 039 040 /** 041 * @param metadataFile could be null 042 * @param message could be null 043 * @param cause could be null 044 */ 045 public PluginMetadataParseException( File metadataFile, String message, Throwable cause ) 046 { 047 super( "Error parsing file: " + metadataFile + ". Reason: " + message, cause ); 048 049 this.metadataFile = metadataFile; 050 this.originalMessage = message; 051 } 052 053 /** 054 * @param metadataFile could be null 055 * @param message could be null 056 */ 057 public PluginMetadataParseException( File metadataFile, String message ) 058 { 059 super( "Error parsing file: " + metadataFile + ". Reason: " + message ); 060 061 this.metadataFile = metadataFile; 062 this.originalMessage = message; 063 } 064 065 /** 066 * @return the metadata file 067 */ 068 public File getMetadataFile() 069 { 070 return metadataFile; 071 } 072 073 /** 074 * @return the original message 075 */ 076 public String getOriginalMessage() 077 { 078 return originalMessage; 079 } 080}