location = File.createTempFile("geronimo-plugin-download-", ".tmp");
OutputStream output = new FileOutputStream(location);
WritableListableRepository writableRepo = new RepoWrapper(repo);
ConfigurationStore store = new RepositoryConfigurationStore(writableRepo);
try {
store.exportConfiguration(artifact, output);
} catch (NoSuchConfigException e) {
throw (IOException)new IOException("Could not locate artefact " + artifact).initCause(e);
}
return location;