Logger.getLogger(ImportSessionFrame.class.getName()).log(Level.SEVERE, null, ex);
} catch (InvocationTargetException ex) {
Logger.getLogger(ImportSessionFrame.class.getName()).log(Level.SEVERE, null, ex);
}
ModuleUploader uploader = new ModuleUploader(new URL(targetServer.getServerURL()));
// if the authentication type is NONE, don't authenticate,
// since the upload will only accept modules from an
// administrator.
// XXX TODO: we should fix this so that upload writes to
// the content repository, so that non-admin users can
// upload art when authenication is turned on XXX
if (targetServer.getDetails().getAuthInfo().getType() !=
AuthenticationInfo.Type.NONE)
{
uploader.setAuthURL(targetServer.getCredentialManager().getAuthenticationURL());
}
uploader.upload(moduleJar);
} catch (MalformedURLException ex) {
LOGGER.log(Level.SEVERE, "MalformedURL " + targetServer.getServerURL(), ex);
return;
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "IO Exception during upload", e);