Search in sources :

Example 6 with VolumeConfiguration

use of io.fabric8.maven.docker.config.VolumeConfiguration in project docker-maven-plugin by fabric8io.

the class VolumeCreateMojo method executeInternal.

@Override
protected void executeInternal(ServiceHub serviceHub) throws DockerAccessException, MojoExecutionException {
    VolumeService volService = serviceHub.getVolumeService();
    for (VolumeConfiguration volume : getVolumes()) {
        log.info("Creating volume '%s'", volume.getName());
        volService.createVolume(volume);
    }
}
Also used : VolumeService(io.fabric8.maven.docker.service.VolumeService) VolumeConfiguration(io.fabric8.maven.docker.config.VolumeConfiguration)

Aggregations

VolumeConfiguration (io.fabric8.maven.docker.config.VolumeConfiguration)5 Test (org.junit.Test)4 Expectations (mockit.Expectations)3 VolumeService (io.fabric8.maven.docker.service.VolumeService)2 VolumeCreateConfig (io.fabric8.maven.docker.access.VolumeCreateConfig)1 RunVolumeConfiguration (io.fabric8.maven.docker.config.RunVolumeConfiguration)1 Delegate (mockit.Delegate)1 JSONObject (org.json.JSONObject)1