title: How to resolve WELD-001318 with Wildfly Swarm for class io.swagger.jaxrs.listing.SwaggerSerializers?
body: <p>I added Wildfly Swarm 2017.12.1 to my pom. I have not added the fractions manually since all are discovered automatically:</p>
  
  <pre><code>2018-01-03 14:37:34,976 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                  Logging - STABLE          org.wildfly.swarm:logging:2017.12.1
  2018-01-03 14:37:34,982 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:         JAX-RS with JAXB - STABLE          org.wildfly.swarm:jaxrs-jaxb:2017.12.1
  2018-01-03 14:37:34,982 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:        CDI Configuration - STABLE          org.wildfly.swarm:cdi-config:2017.12.1
  2018-01-03 14:37:34,982 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                      CDI - STABLE          org.wildfly.swarm:cdi:2017.12.1
  2018-01-03 14:37:34,982 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:      Hibernate Validator - STABLE          org.wildfly.swarm:hibernate-validator:2017.12.1
  2018-01-03 14:37:34,982 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:   JAX-RS with Validation - STABLE          org.wildfly.swarm:jaxrs-validator:2017.12.1
  2018-01-03 14:37:34,982 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                      JCA - STABLE          org.wildfly.swarm:jca:2017.12.1
  2018-01-03 14:37:34,983 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:              Datasources - STABLE          org.wildfly.swarm:datasources:2017.12.1
  2018-01-03 14:37:34,983 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:          Bean Validation - STABLE          org.wildfly.swarm:bean-validation:2017.12.1
  2018-01-03 14:37:34,983 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                  Elytron - STABLE          org.wildfly.swarm:elytron:2017.12.1
  2018-01-03 14:37:34,983 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                   JAX-RS - STABLE          org.wildfly.swarm:jaxrs:2017.12.1
  2018-01-03 14:37:34,983 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                      JPA - STABLE          org.wildfly.swarm:jpa:2017.12.1
  2018-01-03 14:37:34,983 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:             Transactions - STABLE          org.wildfly.swarm:transactions:2017.12.1
  2018-01-03 14:37:34,984 INFO  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                 Undertow - STABLE          org.wildfly.swarm:undertow:2017.12.1
  2018-01-03 14:37:34,984 WARN  [org.wildfly.swarm] (main) WFSWARM0013: Installed fraction:                  Swagger - UNSTABLE        org.wildfly.swarm:swagger:2017.12.1
  </code></pre>
  
  <p>The swagger fraction is unstable. I am not sure why, but anyway. It is added, and later on I get some errors. The error message that I get is this:</p>
  
  <pre><code>2018-01-03 14:37:46,545 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 11) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./: java.lang.RuntimeException: RESTEASY003945: Unable to instantiate MessageBodyWriter
          .... long stacktrace ...
  Caused by: java.lang.RuntimeException: RESTEASY003945: Unable to instantiate MessageBodyWriter
          ... long stacktrace ...
  Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318: Cannot resolve an ambiguous dependency between: 
    - Managed Bean [class io.swagger.jaxrs.listing.SwaggerSerializers] with qualifiers [@Any @Default],
    - Managed Bean [class io.swagger.jaxrs.listing.SwaggerSerializers] with qualifiers [@Any @Default]
          ... stacktrace...
  </code></pre>
  
  <p>As you can see it finds SwaggerSerializers twice in the classpath, so I guess it's an issue with Swarm installing the swagger fraction.
  Perhaps if I add all dependencies manually an leaving swagger out it may work. But I don't think that is a good solution.
  As noted in <a href="https://issues.jboss.org/browse/SWARM-271" rel="nofollow noreferrer">https://issues.jboss.org/browse/SWARM-271</a> it was a bug. </p>
  
  <p>Is there any way to fix this?</p>