}
try {
GeronimoConnectionFactory gcFactory = GeronimoConnectionFactory.getInstance();
RemoteDeploymentManager remoteDM = (RemoteDeploymentManager)gcFactory.getDeploymentManager(server);
remoteDM.installPluginList("repository", relativeServerPath, selectedPlugins);
remoteDM.archive(relativeServerPath, "var/temp", new Artifact(group, artifact, (String)version, format));
}
catch (Exception e) {
e.printStackTrace();
}