Search in sources :

Example 1 with ElasticsearchArtifactResolver

use of com.github.alexcojocaru.mojo.elasticsearch.v2.step.resolveartifact.ElasticsearchArtifactResolver in project elasticsearch-maven-plugin by alexcojocaru.

the class ResolveElasticsearchStep method execute.

@Override
public void execute(InstanceConfiguration config) {
    File unpackDirectory = null;
    try {
        File artifact = new ElasticsearchArtifactResolver(config.getClusterConfiguration()).resolve();
        unpackDirectory = unpackToElasticsearchDirectory(artifact, config);
        setupElasticsearchConf(config);
    } catch (ArtifactException | IOException e) {
        throw new RuntimeException(e);
    } finally {
        cleanUp(unpackDirectory, config.getClusterConfiguration());
    }
}
Also used : ElasticsearchArtifactResolver(com.github.alexcojocaru.mojo.elasticsearch.v2.step.resolveartifact.ElasticsearchArtifactResolver) ArtifactException(com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.ArtifactException) IOException(java.io.IOException) File(java.io.File)

Aggregations

ArtifactException (com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.ArtifactException)1 ElasticsearchArtifactResolver (com.github.alexcojocaru.mojo.elasticsearch.v2.step.resolveartifact.ElasticsearchArtifactResolver)1 File (java.io.File)1 IOException (java.io.IOException)1