org.netbeans.modules.groovy.grails.api.GrailsProjectConfig.GRAILS_IVY_CACHE_DIR_PROPERTY

Here are the examples of the java api org.netbeans.modules.groovy.grails.api.GrailsProjectConfig.GRAILS_IVY_CACHE_DIR_PROPERTY taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

17 Source : BuildConfig.java
with Apache License 2.0
from apache

/**
 * Returns {@link File} representing Ivy cache used for plugin jars.
 *
 * In case if "grails.dependency.cache.dir" property is set either in BuildConfig.groovy
 * or in settings.groovy we will use that one. If not, the default location is used.
 *
 * @return {@link File} representing Ivy cache used for plugin jars
 */
public File getIvyCacheDir() {
    File ivyCacheDir;
    String ivyCache = System.getProperty(GrailsProjectConfig.GRAILS_IVY_CACHE_DIR_PROPERTY);
    if (ivyCache == null) {
        File workDirFile;
        String workDir = System.getProperty(GrailsProjectConfig.GRAILS_WORK_DIR_PROPERTY);
        if (workDir == null) {
            // NOI18N
            workDir = System.getProperty("user.home");
            // NOI18N
            workDir = workDir + File.separator + ".grails";
            workDirFile = new File(workDir);
        } else {
            workDirFile = new File(workDir);
            if (!workDirFile.isAbsolute()) {
                workDirFile = new File(projectRoot, workDir);
            }
        }
        // NOI18N
        ivyCacheDir = new File(workDirFile, "ivy-cache");
    } else {
        ivyCacheDir = new File(ivyCache);
        if (!ivyCacheDir.isAbsolute()) {
            ivyCacheDir = new File(projectRoot, ivyCache);
        }
    }
    return ivyCacheDir;
}