Commit 40e18c60 authored by Ard Schrijvers's avatar Ard Schrijvers

CMS-16 if system property project.basedir is empty, watching files should be skipped

It is similar to auto export which is then also skipped. Also note that when overriding in a profile
it is easy to set <project.basedir> system prop to empty but not to remove it.
parent ab53f11c
......@@ -35,7 +35,7 @@ public class WatchFilesUtils {
public static Path getProjectBaseDir() {
final String projectBaseDir = System.getProperty(PROJECT_BASEDIR_PROPERTY);
if (projectBaseDir != null) {
if (projectBaseDir != null && !projectBaseDir.isEmpty()) {
final Path baseDir = FileSystems.getDefault().getPath(projectBaseDir);
if (Files.isDirectory(baseDir)) {
return baseDir;
......@@ -43,7 +43,7 @@ public class WatchFilesUtils {
log.warn("Watching web files is disabled: environment variable '{}' does not point to a directory", PROJECT_BASEDIR_PROPERTY);
} else {"Watching web files is disabled: environment variable '{}' not set", PROJECT_BASEDIR_PROPERTY);"Watching web files is disabled: environment variable '{}' not set or empty", PROJECT_BASEDIR_PROPERTY);
return null;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment