I'm new to IntelliJ and Maven. I'm writing a Java class that will use the H2 database's WebServlet class.
In my pom.xml, I've added the following to my <dependencies> section:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
In my Java class, when I tell IntelliJ to resolve the symbol WebServlet, it imports javax.servlet.annotation.WebServlet instead of org.h2.server.web.WebServlet. When I try to add the import org.h2.server.web.WebServlet; statement myself, IntelliJ says it cannot resolve symbol 'h2'.
Why is IntelliJ unable to find org.h2.server.web.WebServlet?