diff options
author | Arnout Engelen <arnout@bzzt.net> | 2023-11-14 12:12:18 +0100 |
---|---|---|
committer | Arnout Engelen <arnout@bzzt.net> | 2023-11-14 12:12:18 +0100 |
commit | 3ac1c95cfa84b3b31880935f69a612da246b1025 (patch) | |
tree | 7b18c39d2c9475a80dd530362dcfc0a2a9b64963 | |
parent | e44462d6021bfe23dfb24b775cc7c390844f773d (diff) |
maven: improve buildMavenPackage offline mode
The maven `dependency:go-offline` plugin has various issues (see https://issues.apache.org/jira/browse/MDEP-204 and other issues in that tracker), which the dedicated plugin from https://github.com/qaware/go-offline-maven-plugin largely fixes. I have confirmed that for an application I'm packaging outside of nixpkgs, dependency-track, this indeed makes the build work while it didn't with `dependency:go-offline`. The offline mode is only used in one place in nixpkgs, for lemminx. That build still succeeds and the program starts, though I haven't tested further.
-rw-r--r-- | pkgs/by-name/le/lemminx/package.nix | 2 | ||||
-rw-r--r-- | pkgs/development/tools/build-managers/apache-maven/build-package.nix | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/by-name/le/lemminx/package.nix b/pkgs/by-name/le/lemminx/package.nix index 11fe3f070bbae..816f095e8ce57 100644 --- a/pkgs/by-name/le/lemminx/package.nix +++ b/pkgs/by-name/le/lemminx/package.nix @@ -35,7 +35,7 @@ maven.buildMavenPackage rec { "org.junit.platform:junit-platform-launcher:1.10.0" ]; - mvnHash = "sha256-sIiCp1AorVQXt13Tq0vw9jGioG3zcQMqqKS/Q0Tf4MQ="; + mvnHash = "sha256-LSnClLdAuqSyyT7O4f4aVaPBxdkkZQz60wTmqwQuzdU="; buildOffline = true; 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 e069b5a4daaa9..49c217dbc91c7 100644 --- a/pkgs/development/tools/build-managers/apache-maven/build-package.nix +++ b/pkgs/development/tools/build-managers/apache-maven/build-package.nix @@ -32,7 +32,7 @@ let buildPhase = '' runHook preBuild '' + lib.optionalString buildOffline '' - mvn dependency:go-offline -Dmaven.repo.local=$out/.m2 ${mvnDepsParameters} + mvn de.qaware.maven:go-offline-maven-plugin:1.2.8:resolve-dependencies -Dmaven.repo.local=$out/.m2 ${mvnDepsParameters} for artifactId in ${builtins.toString manualMvnArtifacts} do |