On Wed, Jul 5, 2017 at 5:41 PM, Ecaterina Moraru (Valica)
<[email protected]> wrote:
> Can we make <optional>true</optional> by default?
>
> Or what I mean can we have instead a <mandatory>true</mandatory> instead of
> <optional>?

That would be a very bad idea. In most cases (flavor are really not
most cases) you require the dependencies you indicated.

>
> I fear that devs will forget to put <optional>. Again this matters for
> builds that group modules as dependencies, although are not really needed.
>
> On Wed, Jul 5, 2017 at 6:17 PM, Thomas Mortagne <[email protected]>
> wrote:
>
>> Hi devs,
>>
>> So we now have the concept of optional dependencies at Extension
>> Manager level. This are dependencies that are installed by default
>> (but if they fail they don't fail the whole install) and which can be
>> uninstalled without any impact on what is no longer it's backward
>> dependency.
>>
>> On Maven -> EM side what I did is reuse <optional>true</optional>
>> mostly the following reason: there is no way in pom.xml to put custom
>> stuff in <dependency> so it would be a huge pain to maintain a list of
>> optional dependencies from a property at general pom level.
>>
>> The issue is that the behavior of this <optional> is not exactly the
>> same in EM and Maven: in Maven those dependencies are NOT triggered by
>> default. Still, apart from this it's supposed to be the same meaning
>> and it should not be an issue to install this dependency (if it is
>> then it means you should have used something else like
>> <scope>provided</scope>) but as usually since there is no official way
>> in Maven to say "I just want to use that during the build and it does
>> not make any sens to get this dependency" some projects may have used
>> it that way.
>>
>> So do you think it is OK ? It's not acceptable and we absolutely need
>> to move this kind of information in some general property in the pom
>> <properties> ?
>>
>> --
>> Thomas Mortagne
>>



-- 
Thomas Mortagne

Reply via email to