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.model.Plugin;
22 import org.apache.maven.plugin.descriptor.MojoDescriptor;
23 import org.codehaus.plexus.classworlds.realm.ClassRealm;
24 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
25 import org.codehaus.plexus.component.repository.exception.ComponentRepositoryException;
26 import org.codehaus.plexus.configuration.PlexusConfigurationException;
27
28
29
30
31
32
33
34
35
36
37 public class PluginContainerException extends PluginManagerException {
38
39 private ClassRealm pluginRealm;
40
41 public PluginContainerException(
42 MojoDescriptor mojoDescriptor, ClassRealm pluginRealm, String message, Throwable e) {
43 super(mojoDescriptor, message, e);
44
45 this.pluginRealm = pluginRealm;
46 }
47
48 public PluginContainerException(
49 MojoDescriptor mojoDescriptor, ClassRealm pluginRealm, String message, ComponentLookupException e) {
50 super(mojoDescriptor, message, e);
51
52 this.pluginRealm = pluginRealm;
53 }
54
55 public PluginContainerException(Plugin plugin, ClassRealm pluginRealm, String message, Throwable e) {
56 super(plugin, message, e);
57
58 this.pluginRealm = pluginRealm;
59 }
60
61
62
63
64
65
66 @Deprecated
67 public PluginContainerException(
68 Plugin plugin, ClassRealm pluginRealm, String message, PlexusConfigurationException e) {
69 this(plugin, pluginRealm, message, (Throwable) e);
70 }
71
72
73
74
75
76
77 @Deprecated
78 public PluginContainerException(
79 Plugin plugin, ClassRealm pluginRealm, String message, ComponentRepositoryException e) {
80 this(plugin, pluginRealm, message, (Throwable) e);
81 }
82
83 public ClassRealm getPluginRealm() {
84 return pluginRealm;
85 }
86 }