Enable improved POM support by default This commit makes the experimental flag `IMPROVED_POM_SUPPORT` the default. The flag is still there for backwards compatibility but has effectively no impact. As a consequence, the behavior of improved POM support is now the default, which implies that:
- Maven dependencies packaged as `pom` or `jar` now have derived variants (`compile` and `runtime`) and we properly choose between the variants based on the consumer attributes - platform dependencies using the `platform` and `enforcedPlatform` keywords are enabled
Enabling improved POM support by default is a **breaking change**: there's a risk that resolved dependencies is different, in particular because we will now only include the `compile` dependencies of a POM file whenever the consumer asks for the API variant. There are also some changes in the dependency insight reports due to the use of attribute based matching instead of configuration selection.
Last but not least, this commit is likely to introduce a small performance regression due to attribute based selection.
Import POM files as different variants This commit implements solution 6 of #4422, by importing POM files using different variants. By default, a POM file will be imported as 6 different variants:
- 2 libraries (runtime and compile) - 4 platforms (runtime and compile, regular and enforced)
This implies that a dependency on a BOM will now be intepreted as a dependency on a library, whereas a dependency on a BOM expressed using the `platform(...)` or `enforcedPlatform(...)` methods will be interpreted as importing the platform component published at the same coordinates.
This commit doesn't remove optional dependencies for Maven, but reimplements how the dependencies are shuffled in different variants. The dependencies found in a dependency management block are no longer considered optional. Instead, they are properly marked as constraints. However, they are only visible if using the experimental flag, **and** using the platform variant.