Example #1
0
  protected void setupService() throws MojoExecutionException {
    @SuppressWarnings("unchecked")
    Class<S> serviceClass = (Class<S>) TypeUtil.getServiceClass(getClass());

    try {
      clientFactory = new AWSClientFactory(getAWSCredentials(), getClientConfiguration(), region);

      this.service = clientFactory.getService(serviceClass);
    } catch (Exception exc) {
      throw new MojoExecutionException("Unable to create service", exc);
    }
  }
  protected void setupService() throws MojoExecutionException {
    @SuppressWarnings("unchecked")
    Class<S> serviceClass = (Class<S>) TypeUtil.getServiceClass(getClass());

    this.service = createServiceFor(serviceClass);
  }