Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4013 - Add startTimeout to Piranha Maven plugin #4015

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.apache.maven.plugin.MojoExecutionException;
import static org.apache.maven.plugins.annotations.LifecyclePhase.NONE;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
* This goal will deploy your web application and start Piranha in a separate
Expand All @@ -44,6 +45,12 @@
@Mojo(name = "start", defaultPhase = NONE)
public class StartMojo extends BaseMojo {

/**
* Stores the start timeout (in seconds).
*/
@Parameter(defaultValue = "600", property = "piranha.startTimeout", required = false)
protected Integer startTimeout;

/**
* Default constructor.
*/
Expand Down Expand Up @@ -161,7 +168,7 @@ private void startPiranha() throws IOException {
System.out.print(".");
} catch (InterruptedException ie) {
}
if (count == 600) {
if (count == startTimeout) {
System.out.println();
System.out.println("Warning, PID file not seen!");
break;
Expand Down
1 change: 1 addition & 0 deletions test/micro/helloworld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<configuration>
<distribution>${piranha.distribution}</distribution>
<httpPort>${httpPort}</httpPort>
<startTimeout>30</startTimeout>
</configuration>
</plugin>
<plugin>
Expand Down
Loading