File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
maven/impl-projects/src/main/java/org/jboss/forge/addon/maven/projects Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,25 @@ public T call() throws Exception
4848
4949 public void preShutdown (@ Observes @ Local PreShutdown event )
5050 {
51- if (plexusContainer != null )
51+ try
52+ {
53+ ClassLoaders .executeIn (Thread .currentThread ().getContextClassLoader (), new Callable <Void >()
54+ {
55+ @ Override
56+ public Void call () throws Exception
57+ {
58+ if (plexusContainer != null )
59+ {
60+ plexusContainer .dispose ();
61+ plexusContainer = null ;
62+ }
63+ return null ;
64+ }
65+ });
66+ }
67+ catch (Exception e )
5268 {
53- plexusContainer .dispose ();
54- plexusContainer = null ;
69+ throw new RuntimeException ("Error encountered while disposing PlexusContainer" , e );
5570 }
5671 }
5772
You can’t perform that action at this time.
0 commit comments