Hi,
you probably need this:
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<scope>provided</scope>
</dependency>
By the way: I suggest to declare the WildFly BOM dependency. Thus you import the WildFly dependency chain and can declare all jar files bundled with WildFly in "pom.xml" without version definitions:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>wildfly-jakartaee8-with-tools</artifactId>
<version>24.0.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
<dependencyManagement>
You might create a blank new project from the archetype "wildfly-jakartaee-ear-archetype" and take at look at the way the dependencies are declared there.
Hope this helps
Wolfgang