TomEE arquillian embedded for Microprofile

207 Views Asked by At

I am switching from TomEE arquillian remote container to embedded. But my microprofile annotations are not recognized by embedded container. After that I noticed TomEE embedded container doesn't have classifier ( https://tomee.apache.org/developer/testing/arquillian/index.pdf).

How can I run microprofile application in TomEE embedded container ?

<dependency>
            <groupId>org.apache.tomee</groupId>
            <artifactId>arquillian-tomee-embedded</artifactId>
            <version>8.0.0.M1</version>
            <scope>test</scope>
</dependency>
1

There are 1 best solutions below

0
On

I believe that you can achieve what you want by setting this property on your arquillian.xml:

<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
    <container qualifier="tomee" default="true">
        <configuration>
            <property name="properties">
                tomee.mp.scan = all
            </property>
        </configuration>
    </container>
</arquillian>

This should tell TomEE to activate the MP features when starts.