Have you looked at the AuxiliaryArchiveAppender SPI, make that available on classpath, but only make the TestEnricher available in the AuxiliaryArchiveAppender returned Archive, archive.addServiceProvider(TestEnricher.class, Impl.class)
Thanks a lot, almost there.
Now I just need to add an annotation class in the test cases where I'm not using the test enricher at all.
But I don't get why I need to add the classes in the deployment archive, either with addServiceProvider or addClasses, even when the test enricher is added as a dependency within the test scope.
1 of 1 people found this helpful
Because the TestEnricher is executed inside the container, and how it is transfered to the container is via the deployment using the appender.