// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/ChainedArtifactResolver.java
// public class ChainedArtifactResolver
//         implements PluginArtifactResolver
// {
// 
//     protected List<PluginArtifactResolver> resolverChain = new LinkedList<PluginArtifactResolver>();
// 
//     public ChainedArtifactResolver()
//     {
//         this.resolverChain.add(new SystemPathArtifactResolver());
//     }
// 
//     @Override
//     public File resolveArtifact(final String coordinates) throws ArtifactException
//     {
//         File result = null;
//         for (PluginArtifactResolver resolver : resolverChain)
//         {
//             try
//             {
//                 result = resolver.resolveArtifact(coordinates);
//                 if (result != null)
//                 {
//                     break;
//                 }
//                 // CHECKSTYLE:OFF: Empty catch block
//             }
//             catch (ArtifactException e)
//             {
//             }
//             // CHECKSTYLE:ON: Empty catch block
//         }
//         if (result == null)
//         {
//             throw new ArtifactException(
//                     "Could not resolve artifact with coordinates " + coordinates);
//         }
//         return result;
//     }
// 
//     public void addPluginArtifactResolver(PluginArtifactResolver pluginArtifactResolver)
//     {
//         Validate.notNull(pluginArtifactResolver, "PluginArtifactResolvers should not be null");
//         this.resolverChain.add(pluginArtifactResolver);
//     }
// 
// }
// 
// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/ElasticsearchConfiguration.java
// public interface ElasticsearchConfiguration extends ElasticsearchBaseConfiguration
// {
//     String getVersion();
//     
//     String getClusterName();
//     
//     int getHttpPort();
//     
//     int getTransportPort();
//     
//     String getPathConf();
//     
//     String getPathData();
//     
//     String getPathLogs();
//     
//     List<PluginConfiguration> getPlugins();
//     
//     List<String> getPathInitScript();
//     
//     boolean isKeepExistingData();
//     
//     int getInstanceStartupTimeout();
// 
//     int getClusterStartupTimeout();
//     
//     boolean isSetAwait();
//     
//     boolean isAutoCreateIndex();
// }
// 
// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/PluginArtifactInstaller.java
// public interface PluginArtifactInstaller
// {
// 
//     void installArtifact(ElasticsearchArtifact artifact, File file) throws ArtifactException;
// 
// }
// 
// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/PluginArtifactResolver.java
// public interface PluginArtifactResolver
// {
//     File resolveArtifact(String coordinates) throws ArtifactException;
// }


import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.ChainedArtifactResolver;
import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.ElasticsearchConfiguration;
import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.PluginArtifactInstaller;
import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.PluginArtifactResolver;
import com.google.common.base.Preconditions;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.repository.RemoteRepository;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;
import java.util.stream.Stream;
package com.github.alexcojocaru.mojo.elasticsearch.v2;




/**
 * Mojo to define extra maven parameters required by the run forked mojo.
 *
 * @author Alex Cojocaru
 */
public abstract class AbstractElasticsearchMojo
        extends AbstractElasticsearchBaseMojo
// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/ChainedArtifactResolver.java
// public class ChainedArtifactResolver
//         implements PluginArtifactResolver
// {
// 
//     protected List<PluginArtifactResolver> resolverChain = new LinkedList<PluginArtifactResolver>();
// 
//     public ChainedArtifactResolver()
//     {
//         this.resolverChain.add(new SystemPathArtifactResolver());
//     }
// 
//     @Override
//     public File resolveArtifact(final String coordinates) throws ArtifactException
//     {
//         File result = null;
//         for (PluginArtifactResolver resolver : resolverChain)
//         {
//             try
//             {
//                 result = resolver.resolveArtifact(coordinates);
//                 if (result != null)
//                 {
//                     break;
//                 }
//                 // CHECKSTYLE:OFF: Empty catch block
//             }
//             catch (ArtifactException e)
//             {
//             }
//             // CHECKSTYLE:ON: Empty catch block
//         }
//         if (result == null)
//         {
//             throw new ArtifactException(
//                     "Could not resolve artifact with coordinates " + coordinates);
//         }
//         return result;
//     }
// 
//     public void addPluginArtifactResolver(PluginArtifactResolver pluginArtifactResolver)
//     {
//         Validate.notNull(pluginArtifactResolver, "PluginArtifactResolvers should not be null");
//         this.resolverChain.add(pluginArtifactResolver);
//     }
// 
// }
// 
// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/ElasticsearchConfiguration.java
// public interface ElasticsearchConfiguration extends ElasticsearchBaseConfiguration
// {
//     String getVersion();
//     
//     String getClusterName();
//     
//     int getHttpPort();
//     
//     int getTransportPort();
//     
//     String getPathConf();
//     
//     String getPathData();
//     
//     String getPathLogs();
//     
//     List<PluginConfiguration> getPlugins();
//     
//     List<String> getPathInitScript();
//     
//     boolean isKeepExistingData();
//     
//     int getInstanceStartupTimeout();
// 
//     int getClusterStartupTimeout();
//     
//     boolean isSetAwait();
//     
//     boolean isAutoCreateIndex();
// }
// 
// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/PluginArtifactInstaller.java
// public interface PluginArtifactInstaller
// {
// 
//     void installArtifact(ElasticsearchArtifact artifact, File file) throws ArtifactException;
// 
// }
// 
// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/configuration/PluginArtifactResolver.java
// public interface PluginArtifactResolver
// {
//     File resolveArtifact(String coordinates) throws ArtifactException;
// }


// Path: src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/AbstractElasticsearchMojo.java
import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.ChainedArtifactResolver;
import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.ElasticsearchConfiguration;
import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.PluginArtifactInstaller;
import com.github.alexcojocaru.mojo.elasticsearch.v2.configuration.PluginArtifactResolver;
import com.google.common.base.Preconditions;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.repository.RemoteRepository;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;
import java.util.stream.Stream;

package com.github.alexcojocaru.mojo.elasticsearch.v2;




/**
 * Mojo to define extra maven parameters required by the run forked mojo.
 *
 * @author Alex Cojocaru
 */
public abstract class AbstractElasticsearchMojo
        extends AbstractElasticsearchBaseMojo
        implements ElasticsearchConfiguration