Maven Build error "object h2 is not a member of package org"
Cloned from master. When executing "mvn spring-boot:run" I get error :
[ERROR] /home/david/scala/SpringsScala/src/main/scala/org/springscala/config/H2Config.scala:6: error: object h2 is not a member of package org [ERROR] import org.h2.server.web.WebServlet [ERROR] ^ [ERROR] /home/david/scala/SpringsScala/src/main/scala/org/springscala/config/H2Config.scala:13: error: not found: type WebServlet [ERROR] val registrationBean = new ServletRegistrationBean(new WebServlet)
A SO page refers to the answer which work for me : https://stackoverflow.com/questions/38151447/cannot-import-org-h2-server-web-webservlet With Answer "Shouldn't h2 be a compile (instead of runtime) dependency?"
I changed pom.xml as below diff and then project built and ran :
`
git diff
diff --git a/pom.xml b/pom.xml
index d1a5a57..f804187 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
-
<scope>runtime</scope>
-
<scope>compile</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId>
`