public void setConfigurationVariables(URL configurationURL) { String confURL = configurationURL.toExternalForm(); setVariable("ivy.conf.url", confURL); int slashIndex = confURL.lastIndexOf('/'); if (slashIndex != -1) { setVariable("ivy.conf.dir", confURL.substring(0, slashIndex)); } else { Message.warn("configuration url does not contain any slash (/): ivy.conf.dir variable not set");
public void setConfigurationVariables(File configurationFile) { try { setVariable("ivy.conf.dir", new File(configurationFile.getAbsolutePath()).getParent()); setVariable("ivy.conf.file", configurationFile.getAbsolutePath()); setVariable("ivy.conf.url", configurationFile.toURL().toExternalForm()); } catch (MalformedURLException e) { IllegalArgumentException iae = new IllegalArgumentException("given file cannot be transformed to url: "+configurationFile); iae.initCause(e); throw iae;
    public void setConfigurationVariables(URL configurationURL) {        String confURL = configurationURL.toExternalForm();        setVariable("ivy.conf.url", confURL);        int slashIndex = confURL.lastIndexOf('/');        if (slashIndex != -1) {            setVariable("ivy.conf.dir", confURL.substring(0, slashIndex));        } else {            Message.warn("configuration url does not contain any slash (/): ivy.conf.dir variable not set");        }    }