1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.plugin;
20
21 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
22 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
23 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
24 import org.apache.maven.model.Plugin;
25 import org.apache.maven.model.ReportPlugin;
26 import org.apache.maven.plugin.version.PluginVersionNotFoundException;
27 import org.apache.maven.plugin.version.PluginVersionResolutionException;
28
29
30
31
32
33
34
35
36 public class PluginLoaderException extends Exception {
37
38 private String pluginKey;
39
40 public PluginLoaderException(Plugin plugin, String message, ArtifactResolutionException cause) {
41 super(message, cause);
42 pluginKey = plugin.getKey();
43 }
44
45 public PluginLoaderException(Plugin plugin, String message, ArtifactNotFoundException cause) {
46 super(message, cause);
47 pluginKey = plugin.getKey();
48 }
49
50 public PluginLoaderException(Plugin plugin, String message, PluginNotFoundException cause) {
51 super(message, cause);
52 pluginKey = plugin.getKey();
53 }
54
55 public PluginLoaderException(Plugin plugin, String message, PluginVersionResolutionException cause) {
56 super(message, cause);
57 pluginKey = plugin.getKey();
58 }
59
60 public PluginLoaderException(Plugin plugin, String message, InvalidVersionSpecificationException cause) {
61 super(message, cause);
62 pluginKey = plugin.getKey();
63 }
64
65 public PluginLoaderException(Plugin plugin, String message, InvalidPluginException cause) {
66 super(message, cause);
67 pluginKey = plugin.getKey();
68 }
69
70 public PluginLoaderException(Plugin plugin, String message, PluginManagerException cause) {
71 super(message, cause);
72 pluginKey = plugin.getKey();
73 }
74
75 public PluginLoaderException(Plugin plugin, String message, PluginVersionNotFoundException cause) {
76 super(message, cause);
77 pluginKey = plugin.getKey();
78 }
79
80 public PluginLoaderException(Plugin plugin, String message) {
81 super(message);
82 pluginKey = plugin.getKey();
83 }
84
85 public PluginLoaderException(String message) {
86 super(message);
87 }
88
89 public PluginLoaderException(String message, Throwable cause) {
90 super(message, cause);
91 }
92
93 public PluginLoaderException(ReportPlugin plugin, String message, Throwable cause) {
94 super(message, cause);
95 pluginKey = plugin.getKey();
96 }
97
98 public PluginLoaderException(ReportPlugin plugin, String message) {
99 super(message);
100 pluginKey = plugin.getKey();
101 }
102
103 public String getPluginKey() {
104 return pluginKey;
105 }
106 }