title: Dropwizard configuration not working with a Shaded jar
body: <p>I am facing the following issue when trying to run a shaded jar with properties in the configuration.yaml file. (not occurred when directly ran the main class)</p>
  
  <p>run command: <code>java -jar target/mlsdata-1.0.jar server configuration.yaml</code></p>
  
  <p>ERROR:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>io.dropwizard.configuration.ConfigurationParsingException: configuration.yaml has an error:
    * Failed to parse configuration at: server.applicationConnectors.[0]; Could not resolve type id 'http' as a subtype of [simple type, class io.dropwizard.jetty.ConnectorFactory]: known type ids = [] (for POJO property 'applicationConnectors')
   at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.zaplabs.MlsConfiguration["server"]-&gt;io.dropwizard.server.DefaultServerFactory["applicationConnectors"]-&gt;java.util.ArrayList[0])</code></pre>
  </div>
  </div>
  </p>
  
  <p>From what I understood from various sources, it could be a maven packaging issue. Solutions didn't help me though.</p>
  
  <p>Here is my build setup in POM.</p>
  
  <p>`
  
          </p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                          &lt;classpathPrefix&gt;lib/&lt;/classpathPrefix&gt;
                          &lt;mainClass&gt;com.zaplabs.MlsApplication&lt;/mainClass&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
                  &lt;createDependencyReducedPom&gt;true&lt;/createDependencyReducedPom&gt;
                  &lt;filters&gt;
                      &lt;filter&gt;
                          &lt;artifact&gt;*:*&lt;/artifact&gt;
                          &lt;excludes&gt;
                              &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                              &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                              &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                          &lt;/excludes&gt;
                      &lt;/filter&gt;
                  &lt;/filters&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;shade&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;archive&gt;
                              &lt;manifest&gt;
                                  &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                                  &lt;classpathPrefix&gt;lib/&lt;/classpathPrefix&gt;
                                  &lt;mainClass&gt;com.zaplabs.MlsApplication&lt;/mainClass&gt;
                              &lt;/manifest&gt;
                          &lt;/archive&gt;
                          &lt;transformers&gt;
                              &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/&gt;
                              &lt;transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"&gt;
                                  &lt;mainClass&gt;com.zaplabs.MlsApplication&lt;/mainClass&gt;
                              &lt;/transformer&gt;
                          &lt;/transformers&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>`</p>
  
  <p>Dropwizard version:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;io.dropwizard&lt;/groupId&gt;
          &lt;artifactId&gt;dropwizard-core&lt;/artifactId&gt;
          &lt;version&gt;1.3.0&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Configuration.yaml</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>server:
    applicationConnectors:
      - type: http
        port: 9000
    adminConnectors:
      - type: http
        port: 9001
  
  # Database settings.
  database:
      # the name of the JDBC driver, mysql in our case
      driverClass: com.mysql.jdbc.Driver
      # the username
      user: xxx
      # the password
      password: xxx
      # the JDBC URL
      url: jdbc:mysql://xxx
      properties:
        charSet: UTF-8
        maxWaitForConnection: 1s
        validationQuery: "/* MyService Health Check */ SELECT 1"
        minSize: 8
        maxSize: 32
        checkConnectionWhileIdle: false
        evictionInterval: 10s
        minIdleTime: 1 minute
        hibernate.dialect: org.hibernate.dialect.H2Dialect
        hibernate.show_sql: true
        hibernate.generate_statistics: false
        hibernate.hbm2ddl.auto: validate # validates schema when service is started</code></pre>
  </div>
  </div>
  </p>