I just started using wildfly server version 17 and I got stuck looking into the dependencies that I should mention as provided in my pom file.
I haven't found any thing in the documentation that shows the provided dependencies with their proper versions.
As an example here is what I want:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
I want to know where i get all the dependencies that are provided by the server for future use.
All you need to include in your pom.xml is the
<dependency>
shown in your question.To be clear, you don't usually want or need to "get all the dependencies". All you need is for your code to compile against the Web profile of the EE 7 API, and the
<dependency>
in your question will achieve that. By specifying<scope>provided</scope>
you are explicitly stating that the target runtime, Wildfly 17 in your case, will be providing the required Java EE code, and should not be included in your application's war file.And if you did include any EE code in your application's war file you might get class loader conflicts on the Wildfly server when your application is loaded.
See The Only One Dependency You Need In Java EE 7 for more information.
The content of the Web profile in EE 7 is formally defined in JSR-000342, and from here you can view or download the document WebProfile.pdf. Page 15 provides the information you want for EE 7 Web profile:
If you want to get the code for some specific component of Java EE:
For example:
<dependency>
to the clipboard.