I realise these dependencies are required for compiling against Java servlet specification, and so on, but I'm not clear on the differences between them, and when I should use one as opposed to the other.
What is the difference between them? Is one a superset of the other?
javax
javaee-api
6.0
provided
dependency>
javax
javaee-web-api
6.0
provided
解决方案
The javaee-web-api is supposed to support the Java EE Web Profile.
Introduced in Java EE 6, the Web Profile radically streamlines the platform and enables the creation of a new dawn of lightweight, agile, compelling application servers with a laser focus on web application development.
However if you compare the two different jar files there is little that differs between them. I opened them up in 7-zip and these two screenshots shows the only (AFAIK) differences, namely that there is no support for JMS in the javaee-web-api and that the xml library seems to be larger in the javaee-api.
javaee-api
javaee-web-api