<Dependency>
<Groupid> javax. servlet </groupid>
<Artifactid> JSP-API </artifactid>
<Version> 2.0 </version>
<Scope> provided </scope>
</Dependency>
- CompileThe default scope indicates that dependency can be used in the lifecycle. In addition, these dependencies are passed to the dependent project. Applicable to all stages and will be released along with the Project
- ProvidedSimilar to compile, but it indicates that dependency is provided by JDK or container, such as servlet AP and some java EE APIs. This scope can only be used during compilation and testing without passing.
- RuntimeIt indicates that dependency does not work during compilation, but does work during running and testing, such as the JDBC driver, applicable to the running and testing stages.
- TestIt indicates that dependency is used for testing and does not work for running. It is only used for testing and is used to compile and run the test code. Will not be released along with the project.
- SystemSimilar to provided, but it must be provided in the form of external jar packages in the system. MAVEN will not find it in repository.
Configure the scope!
Remove unnecessary jar packages (Package) from Maven dependent Scope)