diff --git a/src/main/java/dev/webfx/cli/modulefiles/abstr/WebFxModuleFile.java b/src/main/java/dev/webfx/cli/modulefiles/abstr/WebFxModuleFile.java index a8ce337b..a01b1c9a 100644 --- a/src/main/java/dev/webfx/cli/modulefiles/abstr/WebFxModuleFile.java +++ b/src/main/java/dev/webfx/cli/modulefiles/abstr/WebFxModuleFile.java @@ -304,7 +304,12 @@ default Document createInitialDocument() { default void setExecutable(boolean executable) { if (executable != isExecutable()) { - getModuleElement().addAttribute("executable", String.valueOf(executable)); + Element moduleElement = getModuleElement(); + if (moduleElement == null) { + getOrCreateDocument(); + moduleElement = getModuleElement(); + } + moduleElement.addAttribute("executable", String.valueOf(executable)); } } diff --git a/src/main/java/dev/webfx/cli/modulefiles/abstr/XmlModuleFile.java b/src/main/java/dev/webfx/cli/modulefiles/abstr/XmlModuleFile.java index 4eb93a94..9d412e94 100644 --- a/src/main/java/dev/webfx/cli/modulefiles/abstr/XmlModuleFile.java +++ b/src/main/java/dev/webfx/cli/modulefiles/abstr/XmlModuleFile.java @@ -9,7 +9,6 @@ import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; -import org.dom4j.Node; import java.util.Arrays; import java.util.Collections; diff --git a/src/main/resources/dev/webfx/cli/version/dev/version.ini b/src/main/resources/dev/webfx/cli/version/dev/version.ini index 66fc6013..fcaf6c5b 100644 --- a/src/main/resources/dev/webfx/cli/version/dev/version.ini +++ b/src/main/resources/dev/webfx/cli/version/dev/version.ini @@ -1,2 +1,2 @@ version=0.1.0-SNAPSHOT -build.timestamp=2024-06-21 11:14 \ No newline at end of file +build.timestamp=2024-06-21 16:39 \ No newline at end of file