Search in sources :

Example 1 with IvySettings

use of org.apache.ivy.core.settings.IvySettings in project gradle by gradle.

the class DefaultIvyContextManager method getIvy.

private Ivy getIvy() {
    lock.lock();
    try {
        if (!cached.isEmpty()) {
            return cached.removeFirst();
        }
        if (!messageAdapterAttached) {
            Message.setDefaultLogger(new IvyLoggingAdaper());
            messageAdapterAttached = true;
        }
    } finally {
        lock.unlock();
    }
    return Ivy.newInstance(new IvySettings());
}
Also used : IvySettings(org.apache.ivy.core.settings.IvySettings)

Example 2 with IvySettings

use of org.apache.ivy.core.settings.IvySettings in project lucene-solr by apache.

the class LibVersionsCheckTask method setupIvy.

private void setupIvy() {
    IvySettings ivySettings = new IvySettings();
    try {
        ivySettings.setVariable("common.build.dir", commonBuildDir.getAbsolutePath());
        ivySettings.setVariable("ivy.exclude.types", "source|javadoc");
        ivySettings.setVariable("ivy.resolution-cache.dir", ivyResolutionCacheDir.getAbsolutePath());
        ivySettings.setVariable("ivy.lock-strategy", ivyLockStrategy);
        // nested settings file
        ivySettings.setVariable("ivysettings.xml", getProject().getProperty("ivysettings.xml"));
        ivySettings.setBaseDir(commonBuildDir);
        ivySettings.setDefaultConflictManager(new NoConflictManager());
        ivy = Ivy.newInstance(ivySettings);
        ivy.configure(topLevelIvySettingsFile);
    } catch (Exception e) {
        throw new BuildException("Exception reading " + topLevelIvySettingsFile.getPath() + ": " + e.toString(), e);
    }
}
Also used : NoConflictManager(org.apache.ivy.plugins.conflict.NoConflictManager) IvySettings(org.apache.ivy.core.settings.IvySettings) BuildException(org.apache.tools.ant.BuildException) ParseException(java.text.ParseException) SAXException(org.xml.sax.SAXException) TransformerException(javax.xml.transform.TransformerException) BuildException(org.apache.tools.ant.BuildException) IOException(java.io.IOException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException)

Aggregations

IvySettings (org.apache.ivy.core.settings.IvySettings)2 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)1 TransformerException (javax.xml.transform.TransformerException)1 NoConflictManager (org.apache.ivy.plugins.conflict.NoConflictManager)1 BuildException (org.apache.tools.ant.BuildException)1 SAXException (org.xml.sax.SAXException)1