Skip to content

Commit 2f49b31

Browse files
committed
#62 RUN goal fixed
1 parent e8fcd36 commit 2f49b31

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/main/java/com/jcabi/dynamodb/maven/plugin/RunMojo.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
package com.jcabi.dynamodb.maven.plugin;
3131

3232
import com.jcabi.dynamodb.core.Instances;
33+
import com.jcabi.log.Logger;
3334
import java.io.IOException;
35+
import java.util.concurrent.TimeUnit;
3436
import lombok.EqualsAndHashCode;
3537
import lombok.ToString;
3638
import org.apache.maven.plugin.MojoFailureException;
@@ -50,7 +52,7 @@
5052
@Mojo
5153
(
5254
threadSafe = true, name = "run",
53-
defaultPhase = LifecyclePhase.INTEGRATION_TEST
55+
defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST
5456
)
5557
public final class RunMojo extends AbstractEnviromentMojo {
5658

@@ -65,6 +67,16 @@ public void run(final Instances instances) throws MojoFailureException {
6567
"failed to run DynamoDB Local", ex
6668
);
6769
}
70+
Logger.info(
71+
this, "DynamoDB Local is listening on port %d... (Ctrl-C to stop)",
72+
this.tcpPort()
73+
);
74+
try {
75+
TimeUnit.SECONDS.sleep(Long.MAX_VALUE);
76+
} catch (final InterruptedException ex) {
77+
Thread.currentThread().interrupt();
78+
throw new IllegalStateException(ex);
79+
}
6880
}
6981

7082
}

0 commit comments

Comments
 (0)