Examples of artifact()


Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

            if (optional) {
                return null;
            }
            throw new CeylonRunJsException("Cannot find module " + ModuleUtil.makeModuleName(modName, modVersion) + " in specified module repositories");
        }
        return model.artifact();
    }

    protected ArtifactResult getArtifactType(List<ArtifactResult> results, String suffix) {
        for (ArtifactResult r : results) {
            String s = ArtifactContext.getSuffixFromFilename(r.artifact().getName());
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

            ArtifactContext ac = new ArtifactContext(artifact.name(),
                    artifact.version(), ArtifactContext.JS_MODEL);
            ac.setIgnoreDependencies(true);
            ac.setThrowErrorIfMissing(true);
            ArtifactResult lmar = getContext().getRepositoryManager().getArtifactResult(ac);
            js = lmar.artifact();
        }
        if (module instanceof JsonModule) {
            if (((JsonModule)module).getModel() != null) {
                return;
            }
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

        else {
           
            PhasedUnits modulePhasedUnits = createPhasedUnits();
            ClosableVirtualFile virtualArtifact= null;
            try {
                virtualArtifact = context.getVfs().getFromZipFile(sourceArtifact.artifact());
                modulePhasedUnits.parseUnit(virtualArtifact);
                //populate module.getDependencies()
                modulePhasedUnits.visitModules();
                addToPhasedUnitsOfDependencies(modulePhasedUnits, phasedUnitsOfDependencies, module);
            } catch (Exception e) {
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

        }
        RepositoryManager repositoryManager = getRepositoryManager();
        ArtifactContext artifactContext = new ArtifactContext(name, version, ArtifactContext.CAR, ArtifactContext.JAR);
        ArtifactResult result = repositoryManager.getArtifactResult(artifactContext);
        if(!optional
                && (result == null || result.artifact() == null || !result.artifact().exists())){
            String err = getModuleNotFoundErrorMessage(repositoryManager, name, version);
            errorAppend(err);
            errorNewline();
            return;
        }
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

        }
        RepositoryManager repositoryManager = getRepositoryManager();
        ArtifactContext artifactContext = new ArtifactContext(name, version, ArtifactContext.CAR, ArtifactContext.JAR);
        ArtifactResult result = repositoryManager.getArtifactResult(artifactContext);
        if(!optional
                && (result == null || result.artifact() == null || !result.artifact().exists())){
            String err = getModuleNotFoundErrorMessage(repositoryManager, name, version);
            errorAppend(err);
            errorNewline();
            return;
        }
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

                String err = getModuleNotFoundErrorMessage(repositoryManager, module.getName(), version);
                errorAppend(err);
                errorNewline();
                return false;
            }
            zipSource = result.artifact();
        }

        File moduleScriptDir = getModuleScriptDir(module);
        if(moduleScriptDir.exists()){
            if(force)
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

        try {
            final ArtifactResult artifact = findArtifact(moduleIdentifier);
            if (artifact == null)
                return null;

            final File moduleFile = artifact.artifact();
            final boolean isDefault = RepositoryManager.DEFAULT_MODULE.equals(moduleIdentifier.getName());

            final List<DependencySpec> deps = new ArrayList<>();

            ModuleSpec.Builder builder = ModuleSpec.build(moduleIdentifier);
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

        int i=0;
        for(String module : modulesNotInCurrentClassLoader){
            ArtifactResult artifact = loadedModules.get(module);
            try {
                @SuppressWarnings("deprecation")
                URL url = artifact.artifact().toURL();
                urls[i++] = url;
            } catch (MalformedURLException | RepositoryException e) {
                throw new RuntimeException("Failed to get a URL for module file for "+module, e);
            }
        }
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

            return;
        }
        ArtifactContext artifactContext = new ArtifactContext(name, version, ArtifactContext.CAR, ArtifactContext.JAR);
        ArtifactResult result = repositoryManager.getArtifactResult(artifactContext);
        if(!optional
                && (result == null || result.artifact() == null || !result.artifact().exists())){
            throw new RuntimeException("Missing module: "+ModuleUtil.makeModuleName(name, version));
        }
        // save even missing optional modules as nulls to not re-resolve them
        loadedModules.put(name, result);
        loadedModuleVersions.put(name, version);
View Full Code Here

Examples of com.redhat.ceylon.cmr.api.ArtifactResult.artifact()

            return;
        }
        ArtifactContext artifactContext = new ArtifactContext(name, version, ArtifactContext.CAR, ArtifactContext.JAR);
        ArtifactResult result = repositoryManager.getArtifactResult(artifactContext);
        if(!optional
                && (result == null || result.artifact() == null || !result.artifact().exists())){
            throw new RuntimeException("Missing module: "+ModuleUtil.makeModuleName(name, version));
        }
        // save even missing optional modules as nulls to not re-resolve them
        loadedModules.put(name, result);
        loadedModuleVersions.put(name, version);
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.