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