Merge pull request #103755 from hlolli/feature/fetchmaven-classifiers
This commit is contained in:
commit
1df84d17b9
@ -17,6 +17,8 @@ args@
|
|||||||
artifactId
|
artifactId
|
||||||
, # Example: "4.3.6"
|
, # Example: "4.3.6"
|
||||||
version
|
version
|
||||||
|
, # Example: "jdk11"
|
||||||
|
classifier ? null
|
||||||
, # List of maven repositories from where to fetch the artifact.
|
, # List of maven repositories from where to fetch the artifact.
|
||||||
# Example: [ http://oss.sonatype.org/content/repositories/public ].
|
# Example: [ http://oss.sonatype.org/content/repositories/public ].
|
||||||
repos ? defaultRepos
|
repos ? defaultRepos
|
||||||
@ -48,7 +50,7 @@ let
|
|||||||
(replaceChars ["."] ["/"] groupId)
|
(replaceChars ["."] ["/"] groupId)
|
||||||
artifactId
|
artifactId
|
||||||
version
|
version
|
||||||
"${artifactId}-${version}.jar"
|
"${artifactId}-${version}-${optionalString (!isNull classifier) "-${classifier}"}.jar"
|
||||||
];
|
];
|
||||||
urls_ =
|
urls_ =
|
||||||
if url != "" then [url]
|
if url != "" then [url]
|
||||||
@ -56,7 +58,7 @@ let
|
|||||||
else map mkJarUrl repos;
|
else map mkJarUrl repos;
|
||||||
jar =
|
jar =
|
||||||
fetchurl (
|
fetchurl (
|
||||||
builtins.removeAttrs args ["groupId" "artifactId" "version" "repos" "url" ]
|
builtins.removeAttrs args ["groupId" "artifactId" "version" "classifier" "repos" "url" ]
|
||||||
// { urls = urls_; name = "${name_}.jar"; }
|
// { urls = urls_; name = "${name_}.jar"; }
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user