You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2022/04/07 21:28:59 UTC
[royale-compiler] 03/03: royale-maven-plugin: if --watch compiler option is specified, sleep the thread indefinitely so that it doesn't exit
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit fcbb1b0e11edfeae250bb7a8bab9a9866e0955a7
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Thu Apr 7 14:28:38 2022 -0700
royale-maven-plugin: if --watch compiler option is specified, sleep the thread indefinitely so that it doesn't exit
---
.../src/main/java/org/apache/royale/maven/BaseMojo.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java b/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java
index 8dc26568a..70826b782 100644
--- a/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java
+++ b/royale-maven-plugin/src/main/java/org/apache/royale/maven/BaseMojo.java
@@ -385,8 +385,14 @@ public abstract class BaseMojo
}
protected void handleExitCode(int exitCode) throws MojoExecutionException {
+ // if the --watch compiler option was specified, don't continue
if(exitCode == 1000) {
- throw new MojoExecutionException("The --watch compiler option is not supported by royale-maven-plugin");
+ try {
+ while(true) {
+ Thread.sleep(60000);
+ }
+ }
+ catch(InterruptedException e) {}
}
if(exitCode != 0) {
throw new MojoExecutionException("There were errors during the build. Got return code " + exitCode);