Types of dependency

Jetty makes use of three types of maven dependency:

compile - these are real hard dependencies that you need to compile and run the code. In the above example, you can see that jetty-servlet has a single hard dependency on jetty-security, which has transitive dependencies on jetty-server, servlet-api, jetty-http, jetty-io, jetty-util.

provided (optional) - these are used for optional dependencies that are needed to compile the code, but are not necessary at runtime. For example jetty-util provide depends on org.slf4j:slf4j-api so that it can compile the Slf4jLogger, but slf4j is optional at runtime, so that if the dependency is not on the classpath, then the Slf4J logger is not used.

provided (environmental) - these dependencies are also used for dependencies that are expected to be present in a runtime environment. For example the test-jetty-webapp provide depends on the servlet-api so that it can be compiled against the API, but the servlet API is expected to be provided by the servlet container, so the servlet-api JAR is not included in the WEB-INF/lib of the assembled war file.

test - These dependencies are used for unit tests (but some integration tests are in modules with test-foo names and used normal compile dependencies to access common test resources).