I am deploying an ear on wildfly which contains the Extension DeltaspikeContextExtension
. In my test directory, I used a Producer for this extension called DeltaspikeProducerDCE
. I need this producer for my integration tests, because he cannot inject the original extension.
After building (successfully, including the integration tests) and deploying the ear, I start my Wildfly Server and get the following errors:
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type DeltaSpikeContextExtension with qualifiers @Default
..
at org.apache.deltaspike.core.impl.scope.viewaccess.ViewAccessContextArtifactProducer.deltaSpikeContextExtension(ViewAccessContextArtifactProducer.java:0)
Possible dependencies:
- Extension [class org.apache.deltaspike.core.impl.scope.DeltaSpikeContextExtension] with qualifiers [@Default]; torino-application.ear,
- Producer Method [DeltaSpikeContextExtension] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @SessionScoped @Produces public ..ejb.api.registration.service.DeltaspikeProducerDCE.produce()]
I replaced the original package of the project with ..
.
What could cause this behaviour?
The class DeltaspikeProducerDCE
is located in
src/test/java/../api.registration.service
, which normally should be excluded from the ear.
I am using Eclipse Mars and Wildfly 10 and build via Maven.