Package com.redhat.ceylon.compiler.java.tools

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl.call()


       
        // Try to compile the ceylon module
        CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-rep", jarOutputFolder.getPath()),
                (DiagnosticListener<? super FileObject>)null,
                "modules/jarDependency/ceylon/module.ceylon", "modules/jarDependency/ceylon/Foo.ceylon");
        assertEquals(Boolean.TRUE, ceylonTask.call());
    }

    private void compileJavaModule(File jarOutputFolder, File classesOutputFolder,
            String moduleName, String moduleVersion, String... sourceFileNames) throws IOException {
        compileJavaModule(jarOutputFolder, classesOutputFolder,
View Full Code Here


    public void testMdlAetherDependencyDefault() throws IOException{
        // Try to compile the ceylon module
        CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-rep", "aether", "-verbose:cmr"),
                (DiagnosticListener<? super FileObject>)null,
                "modules/aetherdefault/module.ceylon", "modules/aetherdefault/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.2/camel-core-2.9.2.jar");
        assertTrue(camelJar.exists());
        File slf4jJar = new File(System.getProperty("user.home"), ".m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar");
        assertTrue(slf4jJar.exists());
View Full Code Here

    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());
View Full Code Here

        // 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());
    }

    @Test
View Full Code Here

        // Try to compile the ceylon module
        CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir, "-rep", "aether"/*, "-verbose:cmr"*/),
                collector,
                "modules/bug1100/module.ceylon", "modules/bug1100/test.ceylon");
        assertEquals("Compilation failed", Boolean.FALSE, ceylonTask.call());

        TreeSet<CompilerError> actualErrors = collector.get(Diagnostic.Kind.ERROR);
        compareErrors(actualErrors, expectedErrors);
    }

View Full Code Here

        // Try to compile the ceylon module
        CeyloncTaskImpl ceylonTask = getCompilerTask(Arrays.asList("-out", destDir,
                "-rep", "aether",
                "-maven-overrides", getPackagePath()+"/modules/bug1100/overrides.xml"/*, "-verbose:cmr"*/),
                "modules/bug1100/module.ceylon", "modules/bug1100/test.ceylon");
        assertEquals("Compilation failed", Boolean.TRUE, ceylonTask.call());
    }

    @Test
    public void testMdlAetherMissingDependencies2() throws IOException{

View Full Code Here

        options.add(getPackagePath() + "resmodules/simple/resource");
        options.addAll(defaultOptions);
        CeyloncTaskImpl task = getCompilerTask(options,
                null,
                Arrays.asList("test.simple"));
        Boolean ret = task.call();
        assertTrue(ret);
       
        File carFile = getModuleArchive("test.simple", "1.0");
        assertTrue(carFile.exists());
View Full Code Here

        } else {
            task = getCompilerTask(options,
                "resmodules/files/source/test/files/module.ceylon",
                "resmodules/files/resource/test/files/README.txt");
        }
        Boolean ret = task.call();
        assertTrue(ret);
       
        File carFile = getModuleArchive("test.files", "1.0");
        assertTrue(carFile.exists());
View Full Code Here

        }
        options.addAll(defaultOptions);
        CeyloncTaskImpl task = getCompilerTask(options,
                null,
                Arrays.asList("test.multiple"));
        Boolean ret = task.call();
        assertTrue(ret);
       
        File carFile = getModuleArchive("test.multiple", "1.0");
        assertTrue(carFile.exists());
View Full Code Here

        options.add(getPackagePath() + "resmodules/default/resource");
        options.addAll(defaultOptions);
        CeyloncTaskImpl task = getCompilerTask(options,
                "resmodules/default/resource/README.txt",
                "resmodules/default/resource/subdir/SUBDIR.txt");
        Boolean ret = task.call();
        assertTrue(ret);
       
        File carFile = getModuleArchive("default", null);
        assertTrue(carFile.exists());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.