You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rz...@apache.org on 2022/01/17 10:36:37 UTC

[tomee] branch master updated: TOMEE-3825 - TomEE Maven Plugin does not wait for container startup, if "checkStarted" is set to true

This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a959dd  TOMEE-3825 - TomEE Maven Plugin does not wait for container startup, if "checkStarted" is set to true
8a959dd is described below

commit 8a959dda9f5ab80aaef2fb1a89d9f5c51a2c211f
Author: Richard Zowalla <rz...@apache.org>
AuthorDate: Mon Jan 17 09:35:16 2022 +0100

    TOMEE-3825 - TomEE Maven Plugin does not wait for container startup, if "checkStarted" is set to true
---
 .../java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java     | 6 ++++++
 .../main/java/org/apache/openejb/maven/plugin/StartTomEEMojo.java   | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java
index c04c261..201d75c 100644
--- a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java
+++ b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/AbstractTomEEMojo.java
@@ -498,6 +498,12 @@ public abstract class AbstractTomEEMojo extends AbstractAddressMojo {
     protected boolean checkStarted;
 
     /**
+     * The amount of attempts to check if the container is started.
+     */
+    @Parameter(property = "tomee-plugin.check-started-attempts", defaultValue = "60")
+    protected int checkStartedAttempts;
+
+    /**
      * The Use console.
      */
     @Parameter(property = "tomee-plugin.use-console", defaultValue = "true")
diff --git a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/StartTomEEMojo.java b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/StartTomEEMojo.java
index 78f4b92..b38fab4 100644
--- a/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/StartTomEEMojo.java
+++ b/maven/tomee-maven-plugin/src/main/java/org/apache/openejb/maven/plugin/StartTomEEMojo.java
@@ -35,4 +35,9 @@ public class StartTomEEMojo extends UpdatableTomEEMojo {
     protected boolean getWaitTomEE() {
         return false;
     }
+
+    @Override
+    protected int getConnectAttempts() {
+        return (checkStarted ? checkStartedAttempts : 1);
+    }
 }