How are jsf-api and jsf-impl related?

For some time, I have been struggling to run the arquillian test script . This test includes classes embedded in JSF classes, and it ran into ClassFormatError: Absent Code , since no implementation was found for javax.faces.model.DataModel .

My assumption was that I needed to provide my test with a JSF implementation, but the implementations that I found (for example, bundled with JBoss) do not have the javax.faces package, only com.sun , and I could find no trace class DataModel .

Where I do not understand how it works here? Why does impl not implement api ?

+3
source share
1 answer

API:

  • public types to which consumers can write code for

Implementation:

  • Private consumer types should not rely on
  • including things like markup (like HTML) and a container (like servlet)

This separation is not as clean as it should be, but it is largely an intention. Separating these two banks is how the developers decided to organize the code, but you will need to use the library in most contexts.

+1
source

Source: https://habr.com/ru/post/1344073/


All Articles