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 public class PluginLoaderException extends Exception {
36
37 private String pluginKey;
38
39 public PluginLoaderException(Plugin plugin, String message, ArtifactResolutionException cause) {
40 super(message, cause);
41 pluginKey = plugin.getKey();
42 }
43
44 public PluginLoaderException(Plugin plugin, String message, ArtifactNotFoundException cause) {
45 super(message, cause);
46 pluginKey = plugin.getKey();
47 }
48
49 public PluginLoaderException(Plugin plugin, String message, PluginNotFoundException cause) {
50 super(message, cause);
51 pluginKey = plugin.getKey();
52 }
53
54 public PluginLoaderException(Plugin plugin, String message, PluginVersionResolutionException cause) {
55 super(message, cause);
56 pluginKey = plugin.getKey();
57 }
58
59 public PluginLoaderException(Plugin plugin, String message, InvalidVersionSpecificationException cause) {
60 super(message, cause);
61 pluginKey = plugin.getKey();
62 }
63
64 public PluginLoaderException(Plugin plugin, String message, InvalidPluginException cause) {
65 super(message, cause);
66 pluginKey = plugin.getKey();
67 }
68
69 public PluginLoaderException(Plugin plugin, String message, PluginManagerException cause) {
70 super(message, cause);
71 pluginKey = plugin.getKey();
72 }
73
74 public PluginLoaderException(Plugin plugin, String message, PluginVersionNotFoundException cause) {
75 super(message, cause);
76 pluginKey = plugin.getKey();
77 }
78
79 public PluginLoaderException(Plugin plugin, String message) {
80 super(message);
81 pluginKey = plugin.getKey();
82 }
83
84 public PluginLoaderException(String message) {
85 super(message);
86 }
87
88 public PluginLoaderException(String message, Throwable cause) {
89 super(message, cause);
90 }
91
92 public PluginLoaderException(ReportPlugin plugin, String message, Throwable cause) {
93 super(message, cause);
94 pluginKey = plugin.getKey();
95 }
96
97 public PluginLoaderException(ReportPlugin plugin, String message) {
98 super(message);
99 pluginKey = plugin.getKey();
100 }
101
102 public String getPluginKey() {
103 return pluginKey;
104 }
105 }