public static File getUserHome() throws Exception { return getOrFailDirectory("user home", System.getProperty("user.home")); }
public static File getUserLocalRepository() throws Exception { return getOrFailDirectory("user local maven repository", new File(getUserMavenConfigurationHome(), "repository")); }
public static File getUserMavenConfigurationHome() throws Exception { return getOrFailDirectory("maven user config home directory", new File(getUserHome(), ".m2")); }
private File getCreateOrFailPluginDirectory(String deployName) throws Exception { checkState(); File deployDirectory = getPluginDirectoryUnchecked(deployName); try { if (!deployDirectory.exists()) { deployDirectory.mkdir(); } return getOrFailDirectory("plugin", deployDirectory); } catch (Exception e) { throw new LimbusException( String.format("Cannot create plugin deploy folder %s", deployDirectory.getAbsolutePath()), e); } }
public File getOrFailPluginDirectory(String deployName) throws Exception { checkState(); return getOrFailDirectory("plugin", getPluginDirectoryUnchecked(deployName)); }
public File getOrFailWorkDirectory() throws Exception { checkState(); return getOrFailDirectory("work", getWorkDirectoryUnchecked()); }
public File getOrFailDeployDir() throws Exception { checkState(); return getOrFailDirectory("deploy", getDeployDirectoryUnchecked()); }
public File getCreateOrFailDeployDirectory() throws Exception { checkState(); File deployFolder = getDeployDirectoryUnchecked(); createIfMissingDirectory(deployFolder); return getOrFailDirectory("deploy", deployFolder); }
public File getCreateOrFailWorkDirectory() throws Exception { checkState(); File folder = getWorkDirectoryUnchecked(); createIfMissingDirectory(folder); return getOrFailDirectory("work", folder); }