Fix matching of SNAPSHOT artifacts when customizing layers

Previously the artifact's version was used. In an artifact's version,
SNAPSHOT is replaced with the timestamped version number of a specific
snapshot. As a result, it no longer matches the *:*:*SNAPSHOT pattern.

This commit replaces switches to using the artifact's base version.
This preserves the SNAPSHOT in the version number. For non-snapshot
artifacts, the version and base version are identical.

Fixes gh-23533
This commit is contained in:
Andy Wilkinson
2020-09-30 11:03:26 +01:00
parent cd15cbdc79
commit bd4934b0fd
2 changed files with 19 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ public class ArtifactsLibraries implements Libraries {
@Override
public String getVersion() {
return this.artifact.getVersion();
return this.artifact.getBaseVersion();
}
@Override