Hello community,
in my project, I am using the following dependency:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
</dependency>
The version of this and every other vaadin maven dependency is managed by the vaadin-spring-bom-14-3.2.pom. If you include vaadin-core, you automatically get the flow-server maven dependency, which includes the class VaadinSession. VaadinSession implements HttpSessionBindingListener from the maven dependency javax.servlet:servlet-api. The problem I have is, that the servlet-api dependency is not provided transitively by having the flow-server dependency. If I want to use the VaadinSession class, I have to manually add
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
to the pom of the corresponding maven module. Otherwise I get and error on compile time: “Cannot access javax.servlet.http.HttpSessionBindingListener”. My question: did I mess up somewhere or is the dependency really missing when adding the vaadin(-core) dependency to the pom.xml.
Thanks in advance,
Eric