Hi, Ceki.

My understanding is that, yes, if they are part of the main library (i.e. not transitive dependencies from some other library), then they should also be included in the BOM.

The BOM is usually imported under the `<dependencyManagement>` section, which is simply the place where you are managing which versions to use for artifacts. This section doesn't actually say the project is using any particular artifact—it's simply nailing down the versions.

Thus I would say the idea of "optional" doesn't even apply to the `<dependencyManagement>` section and to BOMs. Or to put it another way, at the time you import a BOM into the `<dependencyManagement>` section, /everything/ in the BOM is optional until it is declared to be actually used separately in the actual `<dependencies>` section of the POM or one of its descendants.

Garret

On 6/17/2023 12:32 PM, Ceki Gülcü wrote:
Hello,

Is it considered good practice to reference optional dependencies in BOM
files?

Reply via email to