use of org.commonjava.maven.galley.maven.GalleyMavenBuilder in project galley by Commonjava.
the class GalleyMavenFixture method initGalley.
public void initGalley() throws IOException {
if (temp == null) {
temp = new TemporaryFolder();
}
temp.create();
if (cacheDir == null) {
cacheDir = temp.newFolder("cache");
}
mavenBuilder = new GalleyMavenBuilder();
mavenBuilder.withCacheProviderFactory(new FileCacheProviderFactory(cacheDir));
}
use of org.commonjava.maven.galley.maven.GalleyMavenBuilder in project indy by Commonjava.
the class AutoProxDataManagerDecoratorTest method setup.
@Before
public final void setup() throws Exception {
rootDir = temp.newFolder("indy.root");
autoproxDataDir = new File(rootDir, "data/autoprox");
autoproxDataDir.mkdirs();
File cacheDir = temp.newFolder();
FileCacheProvider cache = new FileCacheProvider(cacheDir, new HashedLocationPathGenerator(), new NoOpFileEventManager(), new NoOpTransferDecorator());
galley = new GalleyMavenBuilder(cache).withEnabledTransports(new HttpClientTransport(new HttpImpl(new MemoryPasswordManager()))).build();
final DataFileManager dataFiles = new DataFileManager(rootDir, new DataFileEventManager());
ruleParser = new ScriptRuleParser(new ScriptEngine(dataFiles));
final AutoProxConfig indyConfig = new AutoProxConfig(autoproxDataDir.getName(), true);
catalog = new AutoProxCatalogManager(dataFiles, indyConfig, ruleParser);
storeDataManager = new TestAutoProxyDataManager(catalog, galley.getTransferManager());
storeDataManager.install();
storeDataManager.clear(summary);
storeQuery = storeDataManager.query().packageType(MAVEN_PKG_KEY);
System.setProperty("baseUrl", http.getBaseUri());
}
Aggregations