Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix application of dependency rules in realized metadata version

The rules for dependencies and dependency constraints were not applied

if the variant itself was added by a rule.

This commit also no longer attempts to apply any rule to the realized

version of 'pure maven configurations'. For Maven, we always use the

derived variants and always use variant matching. Therefore, rules are

never applied to the legacy configurations, but only to the derived

variants.

Follow up to #10368

    • -0
    • +62
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 2 more files in changeset.
Fix application of dependency rules in realized metadata version

The rules for dependencies and dependency constraints were not applied

if the itself variant was added by a rule.

This commit also no longer attempts to apply any rule to the realized

version of 'pure maven configurations'. For Maven, we always use the

derived variants and always use variant matching. Therefore, rules are

never applied to the legacy configurations, but only to the derived

variants.

Follow up to #10368

    • -0
    • +62
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 2 more files in changeset.
Fix application of dependency rules in realized metadata version

The rules for dependencies and dependency constraints were not applied

if the itself variant was added by a rule.

Follow up to #10368

    • -0
    • +62
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 2 more files in changeset.
Rework `forSubgraph` as implied by `strictly`

This commit removes a dedicated `forSubgraph` flag

on version constraints, so that it is _implied_ by

strict version constraints. This simplifies the behavior

of `strictly`, making it closer to the intuitive semantics,

while maintaining the ability to fail the build if a

consumer brings an incompatible version in the graph.

As a consequence, _strict dependencies_ now express that

the producer preference overrides whatever is found in

its own dependency graph. It is closer to the "nearest

first" semantics of Maven, while not having its drawbacks

(ordering in particular).

    • -1
    • +1
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 77 more files in changeset.
Rework `forSubgraph` as implied by `strictly`

This commit removes a dedicated `forSubgraph` flag

on version constraints, so that it is _implied_ by

strict version constraints. This simplifies the behavior

of `strictly`, making it closer to the intuitive semantics,

while maintaining the ability to fail the build if a

consumer brings an incompatible version in the graph.

As a consequence, _strict dependencies_ now express that

the producer preference overrides whatever is found in

its own dependency graph. It is closer to the "nearest

first" semantics of Maven, while not having its drawbacks

(ordering in particular).

    • -1
    • +1
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 79 more files in changeset.
Rework `forSubgraph` as implied by `strictly`

This commit removes a dedicated `forSubgraph` flag

on version constraints, so that it is _implied_ by

strict version constraints. This simplifies the behavior

of `strictly`, making it closer to the intuitive semantics,

while maintaining the ability to fail the build if a

consumer brings an incompatible version in the graph.

As a consequence, _strict dependencies_ now express that

the producer preference overrides whatever is found in

its own dependency graph. It is closer to the "nearest

first" semantics of Maven, while not having its drawbacks

(ordering in particular).

    • -1
    • +1
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 77 more files in changeset.
Rework `forSubgraph` as implied by `strictly`

This commit removes a dedicated `forSubgraph` flag

on version constraints, so that it is _implied_ by

strict version constraints. This simplifies the behavior

of `strictly`, making it closer to the intuitive semantics,

while maintaining the ability to fail the build if a

consumer brings an incompatible version in the graph.

As a consequence, _strict dependencies_ now express that

the producer preference overrides whatever is found in

its own dependency graph. It is closer to the "nearest

first" semantics of Maven, while not having its drawbacks

(ordering in particular).

    • -1
    • +1
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 77 more files in changeset.
Rework `forSubgraph` as implied by `strictly`

This commit removes a dedicated `forSubgraph` flag

on version constraints, so that it is _implied_ by

strict version constraints. This simplifies the behavior

of `strictly`, making it closer to the intuitive semantics,

while maintaining the ability to fail the build if a

consumer brings an incompatible version in the graph.

As a consequence, _strict dependencies_ now express that

the producer preference overrides whatever is found in

its own dependency graph. It is closer to the "nearest

first" semantics of Maven, while not having its drawbacks

(ordering in particular).

    • -1
    • +1
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 77 more files in changeset.
Rework `forSubgraph` as implied by `strictly`

This commit removes a dedicated `forSubgraph` flag

on version constraints, so that it is _implied_ by

strict version constraints. This simplifies the behavior

of `strictly`, making it closer to the intuitive semantics,

while maintaining the ability to fail the build if a

consumer brings an incompatible version in the graph.

As a consequence, _strict dependencies_ now express that

the producer preference overrides whatever is found in

its own dependency graph. It is closer to the "nearest

first" semantics of Maven, while not having its drawbacks

(ordering in particular).

    • -1
    • +1
    ./DependencyMetadataRulesIntegrationTest.groovy
  1. … 77 more files in changeset.
Support variant and file derivation in realized metadata

This required a couple of changes:

- artifacts are now always explicitly serialized for each configuration

- variant derivation is implemented for variants and for configurations

in maven (derived variants) and ivy

- If a ivy module has configurations (variants) that have been added by

a rule, the realized version uses this information to opt-into

variant aware resolution

    • -5
    • +5
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 15 more files in changeset.
Support variant and file derivation in realized metadata

This required a couple of changes:

- artifacts are now always explicitly serialized for each configuration

- variant derivation is implemented for variants and for configurations

in maven (derived variants) and ivy

- If a ivy module has configurations (variants) that have been added by

a rule, the realized version uses this information to opt-into

variant aware resolution

    • -5
    • +7
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 12 more files in changeset.
Add removeAllFiles() to variant files modification API

Files from an existing 'base' are now also transferred to the new

variant (but can then be removed with removeAllFiles()). This makes:

- The behavior more consistent (before everything was transferred

*except* for the files)

- The 'enrich plain ivy with variants' use case better as you do not

manually have to re-add the files that are already in the configuration

metadata

    • -8
    • +4
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 14 more files in changeset.
Add removeAllFiles() to variant files modification API

Files from an existing 'base' are now also transferred to the new

variant (but can then be removed with removeAllFiles()). This makes:

- The behavior more consistent (before everything was transferred

*except* for the files)

- The 'enrich plain ivy with variants' use case better as you do not

manually have to re-add the files that are already in the configuration

metadata

    • -8
    • +4
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 12 more files in changeset.
Add removeAllFiles() to variant files modification API

Files from an existing 'base' are now also transferred to the new

variant (but can then be removed with removeAllFiles()). This makes:

- The behavior more consistent (before everything was transferred

*except* for the files)

- The 'enrich plain ivy with variants' use case better as you do not

manually have to re-add the files that are already in the configuration

metadata

    • -8
    • +4
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 14 more files in changeset.
Add API method to ad a variant without base

Also extend documentation about 'base' and throw errors if a

non-existing base is defined.

    • -1
    • +47
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 6 more files in changeset.
Add API method to ad a variant without base

Also extend documentation about 'base' and throw errors if a

non-existing base is defined.

    • -1
    • +47
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 6 more files in changeset.
Clean up IvyPublication and publish more information to ivy.xml metadata

This cleans up the implementation of `populateFromComponent()` and

introduces the following changes that publish information which

was lossy before:

- Artifacts are now added to all configurations they belong to and

not just the first found

- Dependencies are now added for all configurations they belong to,

with the corresponding mapping and version, and

not just for the first found

- For a Java library, this means the 'runtime' now represents the full

runtime variant of the library (before, only 'default' represented

that)

    • -2
    • +4
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -2
    • +3
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 14 more files in changeset.
Clean up IvyPublication and publish more information to ivy.xml metadata

This cleans up the implementation of `populateFromComponent()` and

introduces the following changes that publish information which

was lossy before:

- Artifacts are now added to all configurations they belong to and

not just the first found

- Dependencies are now added for all configurations they belong to,

with the corresponding mapping and version, and

not just for the first found

- For a Java library, this means the 'runtime' now represents the full

runtime variant of the library (before, only 'default' represented

that)

    • -1
    • +2
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -2
    • +3
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 13 more files in changeset.
Only keep artifacts from pom if the file path is unambiguous

If the packaging indicated in a pom is not in the list of 'known

jar packagings', we assume that the artifact could have the extension

indicated by the packaging. We first test if that artifact exists

with a HEAD request, and only if it does not, we go for the 'jar'

artifact.

Since using a variant file rule disables this mechanism, we remove

such ambiguous artifacts from the modified artifact list to give users

the chance to explicitly state which artifact to expect in the rule

they add anyway.

    • -0
    • +67
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 2 more files in changeset.
Only keep artifacts from pom if the file path is unambiguous

If the packaging indicated in a pom is not in the list of 'known

jar packagings', we assume that the artifact could have the extension

indicated by the packaging. We first test if that artifact exists

with a HEAD request, and only if it does not, we go for the 'jar'

artifact.

Since using a variant file rule disables this mechanism, we remove

such ambiguous artifacts from the modified artifact list to give users

the chance to explicitly state which artifact to expect in the rule

they add anyway.

    • -0
    • +67
    ./VariantFilesMetadataRulesIntegrationTest.groovy
  1. … 2 more files in changeset.
Adjust test fixtures and test to ivy behavior changes

    • -22
    • +2
    ./ComponentAttributesRulesIntegrationTest.groovy
    • -4
    • +2
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -4
    • +2
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 36 more files in changeset.
Fixes

    • -5
    • +9
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -20
    • +22
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 28 more files in changeset.
Fixes

    • -5
    • +9
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -20
    • +22
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 18 more files in changeset.
Fixes

    • -5
    • +9
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -20
    • +22
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 30 more files in changeset.
Remove special casing of pure ivy in resolve tests

    • -22
    • +2
    ./ComponentAttributesRulesIntegrationTest.groovy
    • -11
    • +5
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -24
    • +20
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 7 more files in changeset.
Remove special casing of pure ivy in resolve tests

    • -22
    • +2
    ./ComponentAttributesRulesIntegrationTest.groovy
    • -11
    • +5
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -24
    • +20
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 9 more files in changeset.
Use ivy derivation rules in resolve tests

This allows us to get rid of some special casing in tests that

do not specifically test ivy-only behavior. This tests that common

variant aware dependency management scenarios work for ivy if used

in the recommended way.

    • -22
    • +2
    ./ComponentAttributesRulesIntegrationTest.groovy
    • -0
    • +3
    ./ComponentMetadataRulesCachingIntegrationTest.groovy
    • -11
    • +5
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -0
    • +3
    ./IvySpecificComponentMetadataRulesIntegrationTest.groovy
    • -24
    • +20
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 8 more files in changeset.
Use ivy derivation rules in resolve tests

This allows us to get rid of some special casing in tests that

do not specifically test ivy-only behavior. This tests that common

variant aware dependency management scenarios work for ivy if used

in the recommended way.

    • -22
    • +2
    ./ComponentAttributesRulesIntegrationTest.groovy
    • -0
    • +3
    ./ComponentMetadataRulesCachingIntegrationTest.groovy
    • -11
    • +5
    ./DependencyMetadataRulesIntegrationTest.groovy
    • -0
    • +3
    ./IvySpecificComponentMetadataRulesIntegrationTest.groovy
    • -24
    • +20
    ./VariantAttributesRulesIntegrationTest.groovy
  1. … 8 more files in changeset.
Allow variant matching opt-in for ivy through component metadata rules

    • -0
    • +209
    ./IvyVariantComponentMetadataRulesIntegrationTest.groovy
  1. … 8 more files in changeset.
Allow variant matching opt-in for ivy through component metadata rules

    • -0
    • +235
    ./IvyVariantComponentMetadataRulesIntegrationTest.groovy
  1. … 8 more files in changeset.