use of org.commonjava.indy.inject.TestData in project indy by Commonjava.
the class ProxyConfigProvider method getStorageProviderConfiguration.
@Produces
@TestData
@Default
public synchronized DefaultStorageProviderConfiguration getStorageProviderConfiguration() throws IOException {
if (storageConfig == null) {
final String path = System.getProperty(REPO_ROOT_DIR);
File dir;
if (path == null) {
dir = File.createTempFile("repo.root", ".dir");
dir.delete();
dir.mkdirs();
} else {
dir = new File(path);
}
storageConfig = new DefaultStorageProviderConfiguration(dir);
}
return storageConfig;
}
Aggregations