Search in sources :

Example 11 with ModuleSpec

use of com.redhat.ceylon.common.tools.ModuleSpec in project ceylon-compiler by ceylon.

the class CeylonP2Tool method run.

@Override
public void run() throws Exception {
    RepositoryManager repoManager = getRepositoryManager();
    Map<String, ModuleInfo> allModules = new HashMap<>();
    for (ModuleSpec module : modules) {
        String version = findModuleVersion(module);
        msg("collecting.modules", module.toString());
        newline();
        collectModules(repoManager, module.getName(), version, allModules);
    }
    // now purge empty modules
    purgeMissingModules(allModules);
    Map<String, Feature> features = collectFeatures();
    Map<String, Category> categoriesByName = null;
    if (categories != null) {
        categoriesByName = parseCategories(features);
    }
    msg("generating.artifacts");
    newline();
    printArtifacts(allModules, features);
    msg("generating.content");
    newline();
    printContent(allModules, features, categoriesByName);
}
Also used : ModuleSpec(com.redhat.ceylon.common.tools.ModuleSpec) HashMap(java.util.HashMap) RepositoryManager(com.redhat.ceylon.cmr.api.RepositoryManager)

Aggregations

ModuleSpec (com.redhat.ceylon.common.tools.ModuleSpec)11 LinkedList (java.util.LinkedList)4 ArtifactContext (com.redhat.ceylon.cmr.api.ArtifactContext)3 ModuleVersionDetails (com.redhat.ceylon.cmr.api.ModuleVersionDetails)2 RepositoryManager (com.redhat.ceylon.cmr.api.RepositoryManager)2 ArtifactResult (com.redhat.ceylon.model.cmr.ArtifactResult)2 File (java.io.File)2 ArrayList (java.util.ArrayList)2 ModuleDetails (com.redhat.ceylon.cmr.api.ModuleSearchResult.ModuleDetails)1 ModuleCopycat (com.redhat.ceylon.cmr.ceylon.ModuleCopycat)1 TypeCheckerBuilder (com.redhat.ceylon.compiler.typechecker.TypeCheckerBuilder)1 ModuleSourceMapper (com.redhat.ceylon.compiler.typechecker.analyzer.ModuleSourceMapper)1 Context (com.redhat.ceylon.compiler.typechecker.context.Context)1 ModuleManagerFactory (com.redhat.ceylon.compiler.typechecker.util.ModuleManagerFactory)1 ModuleManager (com.redhat.ceylon.model.typechecker.util.ModuleManager)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 LinkedHashSet (java.util.LinkedHashSet)1 Entry (java.util.Map.Entry)1 SortedMap (java.util.SortedMap)1