Here are the examples of the java api org.netbeans.modules.groovy.grails.api.GrailsProjectConfig.GRAILS_WORK_DIR_PROPERTY taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
19
View Complete Implementation : BuildConfig.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
private File getGlobalPluginsDirDefault11() {
GrailsPlatform platform = GrailsProjectConfig.forProject(project).getGrailsPlatform();
File pluginsDirFile;
String strPluginsDir = System.getProperty(GrailsProjectConfig.GRAILS_GLOBAL_PLUGINS_DIR_PROPERTY);
if (strPluginsDir == 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" + File.separator + platform.getVersion();
workDirFile = new File(workDir);
} else {
workDirFile = new File(workDir);
if (!workDirFile.isAbsolute()) {
workDirFile = new File(projectRoot, workDir);
}
}
// NOI18N
pluginsDirFile = new File(workDirFile, "global-plugins");
} else {
pluginsDirFile = new File(strPluginsDir);
if (!pluginsDirFile.isAbsolute()) {
pluginsDirFile = new File(projectRoot, strPluginsDir);
}
}
return pluginsDirFile;
}
19
View Complete Implementation : BuildConfig.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : 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;
}
18
View Complete Implementation : BuildConfig.java
Copyright Apache License 2.0
Author : apache
Copyright Apache License 2.0
Author : apache
private File getProjectPluginsDirDefault11() {
GrailsPlatform platform = GrailsProjectConfig.forProject(project).getGrailsPlatform();
File pluginsDirFile;
String strPluginsDir = System.getProperty(GrailsProjectConfig.GRAILS_PROJECT_PLUGINS_DIR_PROPERTY);
if (strPluginsDir == null) {
File projectWorkDirFile;
String projectWorkDir = System.getProperty(GrailsProjectConfig.GRAILS_PROJECT_WORK_DIR_PROPERTY);
if (projectWorkDir == 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" + File.separator + platform.getVersion();
workDirFile = new File(workDir);
} else {
workDirFile = new File(workDir);
if (!workDirFile.isAbsolute()) {
workDirFile = new File(projectRoot, workDir);
}
}
// NOI18N
projectWorkDirFile = new File(workDirFile, "projects" + File.separator + projectRoot.getName());
} else {
projectWorkDirFile = new File(projectWorkDir);
if (!projectWorkDirFile.isAbsolute()) {
projectWorkDirFile = new File(projectRoot, projectWorkDir);
}
}
// NOI18N
pluginsDirFile = new File(projectWorkDirFile, "plugins");
} else {
pluginsDirFile = new File(strPluginsDir);
if (!pluginsDirFile.isAbsolute()) {
pluginsDirFile = new File(projectRoot, strPluginsDir);
}
}
return FileUtil.normalizeFile(pluginsDirFile);
}