Re: BOM files referencing optional dependencies

2023-06-18 Thread Hervé Boutemy
Yes
remember, BOM POM is "only" dependencyManagement, then it just locks version 
if the user importing the BOM POM adds the actual dependency: importing BOM 
POM makes the user just ready to eventually use anything easily

Regards,

Hervé

Le samedi 17 juin 2023, 21:32:24 CEST Ceki Gülcü a écrit :
> Hello,
> 
> Is it considered good practice to reference optional dependencies in BOM
> files?





-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: BOM files referencing optional dependencies

2023-06-17 Thread Tamás Cservenák
I would say yes.

My reasoning: BOM is bill of materials, ANY materials potentially needed
for a library.

Otoh, optional dependencies have to be explicitly listed by consumers (POM
consuming your library).

Hence, you will help your consumer by giving them predefined version to
use, IF they enlist the optional dependency.

Thanks
T

On Sat, Jun 17, 2023, 21:32 Ceki Gülcü  wrote:

>
> Hello,
>
> Is it considered good practice to reference optional dependencies in BOM
> files?
>
> --
> Ceki Gülcü
>
> Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: BOM files referencing optional dependencies

2023-06-17 Thread Garret Wilson

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 `` 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 
`` section and to BOMs. Or to put it another way, 
at the time you import a BOM into the `` section, 
/everything/ in the BOM is optional until it is declared to be actually 
used separately in the actual `` 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?


Re: BOM files referencing optional dependencies

2023-06-17 Thread Ceki Gülcü



On 6/17/2023 9:32 PM, Ceki Gülcü wrote:
> 
> Hello,
> 
> Is it considered good practice to reference optional dependencies in BOM
> files?

My question is probably silly as BOM files are reserved for declaring
artifacts a project builds itself and not for dependencies, optional or
otherwise.


-- 
Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



BOM files referencing optional dependencies

2023-06-17 Thread Ceki Gülcü


Hello,

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

-- 
Ceki Gülcü

Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org