use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method testMdlApacheSpark.
@Ignore("It takes ages to download about 200 jars")
@Test
public void testMdlApacheSpark() throws Throwable {
// initially run both without offline, then it's much faster
CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-offline"), "modules/apachespark/module.ceylon", "modules/apachespark/test.ceylon");
assertEquals("Compilation failed", Boolean.TRUE, ceylonTask.call());
runInJBossModules("run", "com.redhat.ceylon.compiler.java.test.cmr.modules.apachespark/1", Arrays.<String>asList("--flat-classpath", "--offline", "--maven-overrides", getPackagePath() + "/modules/apachespark/overrides.xml"));
}
use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method testMdlAetherIgnoreRecursiveDependencies.
@Test
public void testMdlAetherIgnoreRecursiveDependencies() throws IOException {
// Try to compile the ceylon module
CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-rep", "aether", "-verbose:cmr"), (DiagnosticListener<? super FileObject>) null, "modules/aetherIgnoreDependencies/module.ceylon", "modules/aetherIgnoreDependencies/foo.ceylon");
assertEquals(Boolean.TRUE, ceylonTask.call());
// We're assuming a standard Maven configuration here!
File camelJar = new File(System.getProperty("user.home"), ".m2/repository/org/apache/camel/camel-core/2.9.4/camel-core-2.9.4.jar");
assertTrue(camelJar.exists());
File camelJettyJar = new File(System.getProperty("user.home"), ".m2/repository/org/apache/camel/camel-jetty/2.9.4/camel-jetty-2.9.4.jar");
assertTrue(camelJettyJar.exists());
}
use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method testMdlDependenciesFromMavenFlatClasspath.
@Test
public void testMdlDependenciesFromMavenFlatClasspath() throws Throwable {
Assume.assumeTrue("Runs on JDK8", JDKUtils.jdk == JDKUtils.JDK.JDK8);
CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir), "modules/sparkframework/module.ceylon", "modules/sparkframework/test.ceylon");
assertEquals("Compilation failed", Boolean.TRUE, ceylonTask.call());
runInJBossModules("run", "com.redhat.ceylon.compiler.java.test.cmr.modules.sparkframework/1", Arrays.asList("--flat-classpath", "--overrides", getPackagePath() + "/modules/sparkframework/overrides-log.xml"));
}
use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method testMdlAetherDependencyCustom.
@Test
public void testMdlAetherDependencyCustom() throws IOException {
// Try to compile the ceylon module
File settingsFile = new File(getPackagePath(), "modules/aethercustom/settings.xml");
CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-rep", "aether:" + settingsFile.getAbsolutePath(), "-verbose:cmr"), (DiagnosticListener<? super FileObject>) null, "modules/aethercustom/module.ceylon", "modules/aethercustom/foo.ceylon");
assertEquals(Boolean.TRUE, ceylonTask.call());
File restletJar = new File("build/test-cars/cmr-repository", "org/restlet/org.restlet/1.1.10/org.restlet-1.1.10.jar");
assertTrue(restletJar.exists());
}
use of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl in project ceylon-compiler by ceylon.
the class CMRTests method testMdlEndsWithJava.
@Test
public void testMdlEndsWithJava() throws IOException {
List<String> options = new LinkedList<String>();
options.add("-src");
options.add(dir);
options.addAll(defaultOptions);
CeyloncTaskImpl task = getCompilerTask(options, null, Arrays.asList("com.redhat.ceylon.compiler.java.test.cmr.modules.java"));
Boolean ret = task.call();
assertTrue(ret);
}
Aggregations