79559293

Date: 2025-04-07 07:25:35
Score: 0.5
Natty:
Report link

I think @FrVaBe has gave the best answer in this topic.

A dependency identified as optional is literally optional, i.e. the application/library is not bound to it to do what it needs to do. It just enhances functionalities if the dependency is present in runtime's class path.

In contrast, A provided dependency is mandatory, it's just that the jar doesn't contain it by itself. In other word, the application/library can not be executed/used without the dependency but it relies on others (apps, libraries, environments) to provide it in runtime. For example, consider building a spring-boot web application to be deployed traditionally (without embedded tomcat). This application needs tomcat to be able to run as a server application, but tomcat will be provided later.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @FrVaBe
  • Low reputation (0.5):
Posted by: HMD