aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-cli/src')
-rw-r--r--archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
index 102f4bfe8..4bb426a62 100644
--- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
+++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java
@@ -110,7 +110,20 @@ public class ArchivaCli
return;
}
- new ArchivaCli().execute( command );
+ ArchivaCli cli = new ArchivaCli();
+ try
+ {
+ cli.execute( command );
+ }
+ finally
+ {
+ cli.destroy();
+ }
+ }
+
+ private void destroy()
+ {
+ applicationContext.destroy();
}
private void execute( Commands command )