Dependencies
************
Links
=====
- :doc:`plugin/dependency`
Exclude and Provided
====================
The sample code below shows how to mark a dependency as ``provided``. In this
case it will be included in the classpath when compiling, but will not be
included in the generated artifact (e.g. ``war`` file).
The sample code below also shows how to exclude transitive dependencies from a
project. Note: It appears that the exclusion will remove the dependency from
the build even if it is included elsewhere.
::
javax.servlet
servlet-api
2.4
provided
commons-dbcp
commons-dbcp
1.2.1
com.mycompany
lucene-app
1.0
fontbox
fontbox
nekohtml
nekohtml
System Dependencies
===================
`System Dependencies`_
...usually used to tell Maven about dependencies which are provided by the JDK or
the VM:
::
...
javax.sql
jdbc-stdext
2.0
system
${java.home}/lib/rt.jar
.. _`System Dependencies`: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html