Add option to get maven sources
This commit is contained in:
parent
cd7f814c69
commit
bd91833ef6
1 changed files with 9 additions and 0 deletions
|
@ -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}
|
||||
'' + ''
|
||||
|
|
Loading…
Reference in a new issue