In my maven repository under groupId javax.servlet
i have these two separate artifacts for servlets. I am confused which one should i use to build a simple serv
For those using gradle...
If I declare my dependency using compileOnly
as below
compileOnly "javax.servlet:javax.servlet-api:3.1.0"
then I get a compilation error:
error: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
^
If I use providedCompile
as below the build is successful.
providedCompile "javax.servlet:javax.servlet-api:3.1.0"
To use providedCompile
dependencies you need to use the war plugin.
apply plugin: 'war'