use of org.eclipse.ceylon.tools.classpath.CeylonClasspathTool in project ceylon by eclipse.
the class ClasspathToolTests method testNoOptionalModules.
@Test
public void testNoOptionalModules() throws Exception {
ToolModel<CeylonClasspathTool> model = pluginLoader.loadToolModel("classpath");
Assert.assertNotNull(model);
CeylonClasspathTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("ceylon.language/" + Versions.CEYLON_VERSION_NUMBER));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
String cp = b.toString();
Assert.assertTrue(cp.contains("ceylon.language-" + Versions.CEYLON_VERSION_NUMBER + ".car"));
Assert.assertFalse(cp.contains("minidev"));
// Assert.assertFalse(cp.contains("maven"));
Assert.assertFalse(cp.contains("aether"));
// Assert.assertFalse(cp.contains("plexus"));
}
use of org.eclipse.ceylon.tools.classpath.CeylonClasspathTool in project ceylon by eclipse.
the class ClasspathToolTests method testModuleNameWithBadVersion.
@Test
public void testModuleNameWithBadVersion() throws Exception {
ToolModel<CeylonClasspathTool> model = pluginLoader.loadToolModel("classpath");
Assert.assertNotNull(model);
CeylonClasspathTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("ceylon.language/666"));
try {
tool.run();
} catch (ToolUsageError x) {
Assert.assertTrue(x.getMessage().contains("Version 666 not found for module ceylon.language"));
}
}
use of org.eclipse.ceylon.tools.classpath.CeylonClasspathTool in project ceylon by eclipse.
the class ClasspathToolTests method testRecursiveDependenciesOverride.
@Ignore("Disabled due to backward compat break")
@Test
public void testRecursiveDependenciesOverride() throws Exception {
ToolModel<CeylonClasspathTool> model = pluginLoader.loadToolModel("classpath");
Assert.assertNotNull(model);
CeylonClasspathTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("--overrides", getPackagePath() + "/overrides.xml", "io.cayla.web/0.3.0"));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
String cp = b.toString();
Assert.assertTrue(cp.contains("org.jboss.logging-3.1.3.GA.jar"));
Assert.assertFalse(cp.contains("org.jboss.logging-3.1.2.GA.jar"));
}
use of org.eclipse.ceylon.tools.classpath.CeylonClasspathTool in project ceylon by eclipse.
the class ClasspathToolTests method testWithOptionalModules.
@Test
public void testWithOptionalModules() throws Exception {
ToolModel<CeylonClasspathTool> model = pluginLoader.loadToolModel("classpath");
Assert.assertNotNull(model);
CeylonClasspathTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("ceylon.language/" + Versions.CEYLON_VERSION_NUMBER, "org.eclipse.ceylon.module-resolver-aether/" + Versions.CEYLON_VERSION_NUMBER));
StringBuilder b = new StringBuilder();
tool.setOut(b);
tool.run();
String cp = b.toString();
Assert.assertTrue(cp.contains("ceylon.language-" + Versions.CEYLON_VERSION_NUMBER + ".car"));
Assert.assertFalse(cp.contains("minidev"));
// Assert.assertTrue(cp.contains("maven"));
Assert.assertTrue(cp.contains("aether"));
// Assert.assertTrue(cp.contains("plexus"));
}
Aggregations