maven - Intellij cannot run Spring app with a certain dependency -
i'm working on webapp spring , maven , want able run application within local tomcat server , intellij. dependency seems culprit. <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-tomcat</artifactid> <scope>provided</scope> </dependency> when remove dependency application runs fine in intellij because of other dependency can't run on tomcat. <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-web</artifactid> </dependency> can set automatically use right dependency intellij? you can setup maven profile in pom.xml, use specific profile intellij. intellij allows select profile while running build. <profiles> <profile> <id>intellij</id> … <dependencies> <dependency>…</dependency> </dependencies> … </pr...