diff options
author | Bruce Collie <brucecollie82@gmail.com> | 2024-02-29 11:48:33 +0000 |
---|---|---|
committer | Bruce Collie <brucecollie82@gmail.com> | 2024-02-29 11:48:33 +0000 |
commit | bd91833ef6d26c4445e03fd58bd945eed5004215 (patch) | |
tree | d4f585a502295d2d26f3cc970446d948da57f4e8 | |
parent | cd7f814c6941fb77df3d36a6f320ff111464bb57 (diff) |
Add option to get maven sources
-rw-r--r-- | pkgs/development/tools/build-managers/apache-maven/build-package.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/apache-maven/build-package.nix b/pkgs/development/tools/build-managers/apache-maven/build-package.nix index 49c217dbc91c7..43fc8e1232444 100644 --- a/pkgs/development/tools/build-managers/apache-maven/build-package.nix +++ b/pkgs/development/tools/build-managers/apache-maven/build-package.nix @@ -13,6 +13,7 @@ , mvnFetchExtraArgs ? { } , mvnDepsParameters ? "" , manualMvnArtifacts ? [ ] +, manualMvnSources ? [ ] , mvnParameters ? "" , ... } @args: @@ -39,6 +40,14 @@ let echo "downloading manual $artifactId" mvn dependency:get -Dartifact="$artifactId" -Dmaven.repo.local=$out/.m2 done + + for artifactId in ${builtins.toString manualMvnSources} + do + group=$(echo $artifactId | cut -d':' -f1) + artifact=$(echo $artifactId | cut -d':' -f2) + echo "downloading manual sources $artifactId" + mvn dependency:sources -DincludeGroupIds="$group" -DincludeArtifactIds="$artifact" -Dmaven.repo.local=$out/.m2 + done '' + lib.optionalString (!buildOffline) '' mvn package -Dmaven.repo.local=$out/.m2 ${mvnParameters} '' + '' |