Search in sources :

Example 1 with TestData

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;
}
Also used : DefaultStorageProviderConfiguration(org.commonjava.indy.filer.def.conf.DefaultStorageProviderConfiguration) File(java.io.File) TestData(org.commonjava.indy.inject.TestData) Produces(javax.enterprise.inject.Produces) Default(javax.enterprise.inject.Default)

Aggregations

File (java.io.File)1 Default (javax.enterprise.inject.Default)1 Produces (javax.enterprise.inject.Produces)1 DefaultStorageProviderConfiguration (org.commonjava.indy.filer.def.conf.DefaultStorageProviderConfiguration)1 TestData (org.commonjava.indy.inject.TestData)1