title: Weld has ambiguous dependencies error only in production
body: <p>I build a application with weld se 2.0 and other simple dependencies. 
  In my development environment(eclipse) this works fine, no errors, but... in production the app crash totally and the part of intern dependencies of weld throws 'Ambiguous dependencies' errors: </p>
  
  <pre><code>Exception 0 :
  org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Cannot resolve an ambiguous     dependency between:
    - Implicit Bean [javax.enterprise.inject.spi.InjectionPoint] with qualifiers [@Default],
    - Managed Bean [class org.jboss.weld.injection.EmptyInjectionPoint] with qualifiers [@Any @Default],
    - Managed Bean [class org.jboss.weld.manager.BeanManagerImpl$InstanceInjectionPoint] with qualifiers [@Any @Default]
          at org.jboss.weld.manager.BeanManagerImpl.resolve(BeanManagerImpl.java:1176)
          at org.jboss.weld.bootstrap.Validator.validatePseudoScopedInjectionPoint(Validator.java:929)
          at org.jboss.weld.bootstrap.Validator.reallyValidatePseudoScopedBean(Validator.java:902)
          at org.jboss.weld.bootstrap.Validator.validatePseudoScopedInjectionPoint(Validator.java:935)
          at org.jboss.weld.bootstrap.Validator.reallyValidatePseudoScopedBean(Validator.java:902)
          at org.jboss.weld.bootstrap.Validator.validatePseudoScopedBean(Validator.java:879)
          at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:192)
          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:209)
          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:521)
          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:71)
          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:69)
          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>....</p>
  
  <pre><code> Exception 0 :
   org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [Instance&lt;Object&gt;] 
  with qualifiers [@Any] at injection point [[BackedAnnotatedField] @Inject @Any      org.jboss.weld.environment.se.beans.InstanceManager.instances]. 
  Possible dependencies:
    - Managed Bean [class org.jboss.weld.Weld] with qualifiers [@Any @Default],
    - Implicit Bean [javax.enterprise.inject.Instance] with qualifiers [@Default],
    - Managed Bean [class org.jboss.weld.servlet.StaticWeldProvider$EnhancedWeld] with qualifiers [@Any @Default]
          at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:408)
          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:327)
          at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:178)
          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:209)
          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:521)
          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:71)
          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:69)
          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>....</p>
  
  <pre><code> Exception 0 :
   org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [List&lt;String&gt;] with qualifiers [@Parameters] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] @Produces @GlobalProperties @ApplicationScoped public br.com.aptalaser.mensageria.factory.PropertiesConfigurationBuilder.getProperties(@Parameters List&lt;String&gt;)].
  Possible dependencies:
    - Producer Method [List&lt;String&gt;] with qualifiers [@Parameters @Any] declared as [[BackedAnnotatedMethod] @Produces @Parameters public org.jboss.weld.environment.se.beans.ParametersFactory.getArgs()],
    - Producer Method [List&lt;String&gt;] with qualifiers [@Parameters @Any] declared as [[UnbackedAnnotatedMethod] @Produces @Parameters public org.jboss.weld.environment.se.beans.ParametersFactory.getArgs()]
          at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:408)
          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:327)
          at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:178)
          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:209)
          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:521)
          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:71)
          at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:69)
          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
          at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>I use jdk 1.7 and weld-se 2.0. </p>
  
  <p>pom.xml:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;apta&lt;/groupId&gt;
  &lt;artifactId&gt;mensageria&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
  &lt;properties&gt;
      &lt;maven.compiler.source&gt;1.7&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.7&lt;/maven.compiler.target&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.10&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.mockito&lt;/groupId&gt;
          &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
          &lt;version&gt;1.9.5&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.arquillian&lt;/groupId&gt;
          &lt;artifactId&gt;arquillian-bom&lt;/artifactId&gt;
          &lt;version&gt;1.1.1.Final&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.arquillian.junit&lt;/groupId&gt;
          &lt;artifactId&gt;arquillian-junit-container&lt;/artifactId&gt;
          &lt;version&gt;1.0.2.Final&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.arquillian.container&lt;/groupId&gt;
          &lt;artifactId&gt;arquillian-weld-se-embedded-1.1&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.CR7&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.mybatis&lt;/groupId&gt;
          &lt;artifactId&gt;mybatis&lt;/artifactId&gt;
          &lt;version&gt;3.2.3&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
          &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
          &lt;version&gt;2.2.9&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;version&gt;5.1.22&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;aopalliance&lt;/groupId&gt;
          &lt;artifactId&gt;aopalliance&lt;/artifactId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.mchange&lt;/groupId&gt;
          &lt;artifactId&gt;c3p0&lt;/artifactId&gt;
          &lt;version&gt;0.9.5-pre1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;joda-time&lt;/groupId&gt;
          &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
          &lt;version&gt;2.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.weld.se&lt;/groupId&gt;
          &lt;artifactId&gt;weld-se-core&lt;/artifactId&gt;
          &lt;version&gt;2.0.3.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.javassist&lt;/groupId&gt;
          &lt;artifactId&gt;javassist&lt;/artifactId&gt;
          &lt;version&gt;3.14.0-GA&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.json&lt;/groupId&gt;
          &lt;artifactId&gt;json&lt;/artifactId&gt;
          &lt;version&gt;20090211&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
          &lt;version&gt;2.0-beta4&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
          &lt;version&gt;2.0-beta4&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-slf4j-impl&lt;/artifactId&gt;
          &lt;version&gt;2.0-beta8&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;5.0.1.Final&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;archive&gt;
                      &lt;manifest&gt;
                          &lt;mainClass&gt;org.jboss.weld.environment.se.StartMain&lt;/mainClass&gt;
                      &lt;/manifest&gt;
                  &lt;/archive&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &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;1.4&lt;/version&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;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.16&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;skipTests&gt;true&lt;/skipTests&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>What can be the cause? My app works fine in eclipse, my dependencies is bad configured or my build process is wrong? What i can do to avoid this exception?</p>
  
  <p>Kind regards Samuel.</p>