Package com.redhat.ceylon.cmr.ceylon

Examples of com.redhat.ceylon.cmr.ceylon.ModuleCopycat


            acs.add(ac);
        }
       
        // Now do the actual copying
        final boolean logArtifacts = verbose != null && (verbose.contains("all") || verbose.contains("files"));
        ModuleCopycat copier = new ModuleCopycat(getRepositoryManager(), getOutputRepositoryManager(), log, new ModuleCopycat.CopycatFeedback() {
            @Override
            public boolean beforeCopyModule(ArtifactContext ac, int count, int max) throws IOException {
                String module = ModuleUtil.makeModuleName(ac.getName(), ac.getVersion());
                msg("copying.module", module, count+1, max).flush();
                if (logArtifacts) {
                    newline().flush();
                }
                return true;
            }
            @Override
            public void afterCopyModule(ArtifactContext ac, int count, int max, boolean copied) throws IOException {
                if (!logArtifacts) {
                    append(" ").msg((copied) ? "copying.ok" : "copying.skipped").newline().flush();
                }
            }
            @Override
            public boolean beforeCopyArtifact(ArtifactContext ac, File archive, int count, int max) throws IOException {
                if (logArtifacts) {
                    append("    ").msg("copying.artifact", archive.getName(), count+1, max).flush();
                }
                return true;
            }
            @Override
            public void afterCopyArtifact(ArtifactContext ac, File archive, int count, int max, boolean copied) throws IOException {
                if (logArtifacts) {
                    append(" ").msg((copied) ? "copying.ok" : "copying.skipped").newline().flush();
                }
            }
            @Override
            public void notFound(ArtifactContext ac) throws IOException {
                String err = getModuleNotFoundErrorMessage(getRepositoryManager(), ac.getName(), ac.getVersion());
                errorAppend(err);
                errorNewline();
            }
        });
        copier.copyModules(acs);
    }
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.cmr.ceylon.ModuleCopycat

Copyright © 2018 www.massapicom. 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.