![JAR search and dependency download from the Maven repository](/logo.png)
com.alexecollins.docker.mojo.StartMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker-maven-plugin Show documentation
Show all versions of docker-maven-plugin Show documentation
A plug-in for starting and stopping Docker containers.
package com.alexecollins.docker.mojo;
import com.alexecollins.docker.orchestration.DockerOrchestrator;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import java.util.Map;
/**
* Start all the containers.
*/
@Mojo(name = "start", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST)
public class StartMojo extends AbstractDockerMojo {
@Override
protected void doExecute(DockerOrchestrator orchestrator) {
orchestrator.start();
Map idAndIpMap = orchestrator.getIPAddresses();
for (String id : idAndIpMap.keySet()) {
getProject().getProperties().setProperty("docker." + id + ".ipAddress", idAndIpMap.get(id));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy