Search in sources :

Example 1 with AetherContentStore

use of org.eclipse.ceylon.cmr.maven.AetherContentStore in project ceylon by eclipse.

the class AetherTestCase method testSimpleTest.

@Test
public void testSimpleTest() throws Throwable {
    StructureBuilder structureBuilder = new AetherContentStore(log, null, null, false, 60000, new File("").getAbsolutePath());
    CmrRepository repository = MavenRepositoryHelper.getMavenRepository(structureBuilder);
    RepositoryManager manager = new SimpleRepositoryManager(repository, log);
    File artifact = manager.getArtifact(MavenArtifactContext.NAMESPACE, "org.slf4j:slf4j-api", "1.6.4");
    boolean exists = false;
    try {
        Assert.assertNotNull(artifact);
        Assert.assertTrue(artifact.exists());
        exists = true;
    } finally {
        if (exists) {
            // delete this one
            Assert.assertTrue(artifact.delete());
        }
    }
}
Also used : SimpleRepositoryManager(org.eclipse.ceylon.cmr.impl.SimpleRepositoryManager) StructureBuilder(org.eclipse.ceylon.cmr.spi.StructureBuilder) AetherContentStore(org.eclipse.ceylon.cmr.maven.AetherContentStore) RepositoryManager(org.eclipse.ceylon.cmr.api.RepositoryManager) SimpleRepositoryManager(org.eclipse.ceylon.cmr.impl.SimpleRepositoryManager) CmrRepository(org.eclipse.ceylon.cmr.api.CmrRepository) File(java.io.File) Test(org.junit.Test)

Aggregations

File (java.io.File)1 CmrRepository (org.eclipse.ceylon.cmr.api.CmrRepository)1 RepositoryManager (org.eclipse.ceylon.cmr.api.RepositoryManager)1 SimpleRepositoryManager (org.eclipse.ceylon.cmr.impl.SimpleRepositoryManager)1 AetherContentStore (org.eclipse.ceylon.cmr.maven.AetherContentStore)1 StructureBuilder (org.eclipse.ceylon.cmr.spi.StructureBuilder)1 Test (org.junit.Test)1