use of org.eclipse.ceylon.cmr.spi.StructureBuilder in project ceylon by eclipse.
the class AbstractOpenNode method getNode.
protected OpenNode getNode(String label, boolean create) {
final StructureBuilder builder = findService(StructureBuilder.class);
OpenNode child = create ? builder.create(this, label) : builder.find(this, label);
if (child != null) {
child = put(children, label, child);
}
return child;
}
use of org.eclipse.ceylon.cmr.spi.StructureBuilder 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());
}
}
}
Aggregations