use of org.commonjava.indy.filer.def.conf.DefaultStorageProviderConfiguration 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;
}
use of org.commonjava.indy.filer.def.conf.DefaultStorageProviderConfiguration in project indy by Commonjava.
the class TestProvider method init.
@PostConstruct
public void init() {
try {
this.storageProviderConfig = new DefaultStorageProviderConfiguration(TEMP.newFolder("storage"));
this.dataConfig = new DataFileConfiguration(TEMP.newFolder("data"), TEMP.newFolder("work"));
} catch (final IOException e) {
e.printStackTrace();
Assert.fail("Failed to setup temporary directory structures: " + e.getMessage());
}
this.nfc = new MemoryNotFoundCache();
this.xmlInfra = new XMLInfrastructure();
this.typeMapper = new StandardTypeMapper();
this.indyConfig = new DefaultIndyConfiguration();
this.objectMapper = new IndyObjectMapper(true);
}
Aggregations