APISonar


org.apache.tools.ant.Project.log

> org > apache > tools > ant > Project > log
org APIs apache APIs tools APIs ant APIs Project APIs log APIs

Example 1
private Project project;

    protected void log(String message, int priority) {
        if (project != null) {
            project.log(message, priority);
        }
    }
Example 2
private static URL appendPathInArchive(URL rootURL, String pathInArchive, Project prj) {
        String embeddedURL = rootURL.toExternalForm() + pathInArchive;
        if (embeddedURL.charAt(embeddedURL.length()-1) != '/') {    //NOI18N
            embeddedURL = embeddedURL + '/';    //NOI18N
        }
        try {
            return new URL(embeddedURL);
        } catch (MalformedURLException e) {
            prj.log("Invalid embedded URL: \""+embeddedURL+"\".", Project.MSG_WARN);   //NOI18N
            return rootURL;
        }
    }
Example 3
private static boolean isValid (File f, Project project) {
        if (f.getPath ().indexOf ("${") != -1 && !f.exists ()) { // NOI18N
            project.log (
                "Classpath item " + f + " will be ignored.",  // NOI18N
                Project.MSG_VERBOSE
            );
            return false;
        }
        return true;
    }
Example 4
static void verifyPaths(Project project, Path path) {
        if (path == null) return ;
        String[] paths = path.list();
        for (int i = 0; i < paths.length; i++) {
            String pathName = project.replaceProperties(paths[i]);
            File file = FileUtil.normalizeFile
                (project.resolveFile (pathName));
            if (!file.exists()) {
                project.log("Non-existing path \""+pathName+"\" provided.", Project.MSG_WARN);
                //throw new BuildException("Non-existing path \""+paths[i]+"\" provided.");
            }
        }
    }
Example 5
private Project project;

    private void setupClassLoader() {
        try {
            if (auxClasspath != null) {
                project.log("Using auxclasspath: " + auxClasspath, Project.MSG_VERBOSE);
                configuration.prependClasspath(auxClasspath.toString());
            }
        } catch (IOException ioe) {
            throw new BuildException(ioe.getMessage(), ioe);
        }
    }
Example 6
private final Project project;

    public void updateScope( Artifact artifact, String scope )
    {
        project.log( indent + artifact.getId() + " (settings scope to: " + scope + ")" );
    }
Example 7
private final Project project;

    public void manageArtifact( Artifact artifact, Artifact replacement )
    {
        String msg = indent + artifact;
        msg += " (";
        if ( replacement.getVersion() != null )
        {
            msg += "applying version: " + replacement.getVersion() + ";";
        }
        if ( replacement.getScope() != null )
        {
            msg += "applying scope: " + replacement.getScope();
        }
        msg += ")";
        project.log( msg );
    }
Example 8
private static Project project = null;

    public static void setProject(final Project project) {
        Utils.project = project;
        useInternalPacker = "true".equals(project.getProperty("use.internal.packer"));
        useInternalUnpacker = "true".equals(project.getProperty("use.internal.unpacker"));
        xmx = ARG_PREFIX + XMX_ARG + project.getProperty("pack200.xmx");
        permSize = ARG_PREFIX + PERM_SIZE_ARG + project.getProperty("pack200.perm.size");
        maxPermSize = ARG_PREFIX + MAX_PERM_SIZE_ARG + project.getProperty("pack200.max.perm.size");
        String output = "use.internal.packer? " + useInternalPacker;
        if (project != null) {
            project.log("            " + output);
        } else {
            System.out.println(output);
        }
    }
Example 9
private Project project;

    private void logRulesUsed(RuleSets rules) {
        project.log("Using these rulesets: " + configuration.getRuleSets(), Project.MSG_VERBOSE);

        RuleSet[] ruleSets = rules.getAllRuleSets();
        for (RuleSet ruleSet : ruleSets) {
            for (Rule rule : ruleSet.getRules()) {
                project.log("Using rule " + rule.getName(), Project.MSG_VERBOSE);
            }
        }
    }
Example 10
private final Project project;

    public void omitForNearer( Artifact omitted, Artifact kept )
    {
        project.log( indent + omitted.getId() + " (removed - nearer found: " + kept.getVersion() + ")" );
    }