-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pin maven-resources-plugin 2.6 #57
base: master
Are you sure you want to change the base?
Conversation
fix build with latest nixpkgs and latest jdk build error was: > Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.0 or one of its dependencies could not be resolved adding missing dependencies to mvn2nix-lock.json does not help, the build fails with another error: > Error injecting: org.apache.maven.plugins.resources.ResourcesMojo > Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.3.0:resources (default-resources) on project mvn2nix > No implementation for MavenResourcesFiltering was bound.
fix: Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.0 or one of its dependencies could not be resolved upstream PR: fzakaria/mvn2nix#57
Looks like i have to update the test jobs. one sec |
push |
What does push mean ? |
this is still an issue when building mvn2nix with mvn2nix.nix# based on src/mvn2nix/default.nix
# avoid external sources: niv, nix-gitignore, nixpkgs
# fix: error: access to URI 'https://github.com/NixOS/nixpkgs/archive/a332da8588aeea4feb9359d23f58d95520899e3c.tar.gz' is forbidden in restricted mode
# avoid overlays
{ lib
, pkgs
, jdk_headless
}:
# create scope to override jdk
lib.makeScope pkgs.newScope (self: with self; rec {
jdk = jdk_headless;
mvn2nix = (self.callPackage ./src/mvn2nix/derivation.nix { }) // {
# fix: error: attribute 'buildMavenRepositoryFromLockFile' missing
# at pkgs/mwdumper/mwdumper.nix:
# mvn2nix.buildMavenRepositoryFromLockFile { file = ./mvn2nix-lock.json; };
inherit buildMavenRepository buildMavenRepositoryFromLockFile;
};
mvn2nix-bootstrap = self.callPackage ./src/mvn2nix/derivation.nix { bootstrap = true; };
buildMavenRepository =
(self.callPackage ./src/mvn2nix/maven.nix { }).buildMavenRepository;
buildMavenRepositoryFromLockFile =
(self.callPackage ./src/mvn2nix/maven.nix { }).buildMavenRepositoryFromLockFile;
}) ... called by default.nix # mvn2nix
inherit (callPackage ./pkgs/development/tools/mvn2nix/mvn2nix.nix { })
mvn2nix
mvn2nix-bootstrap
buildMavenRepository
buildMavenRepositoryFromLockFile
; ... or (not-yet verified) when building mvn2nix default.nix.diff--- a/default.nix
+++ b/default.nix
@@ -1,5 +1,6 @@
-{ nixpkgs ? (import ./nix/sources.nix).nixpkgs,
+{ pkgs ? (import ./nix/sources.nix).nixpkgs,
system ? builtins.currentSystem }:
+let nixpkgs = pkgs; in
let
sources = import ./nix/sources.nix;
pkgs = import nixpkgs { ... because nixpkgs has no nixpkgs attribute
|
Your fix helps? I'm hesitant to merge but it looks safe. |
works for me : )
this requires either
or a default.nix{ pkgs ? null,
# TODO remove the nixpkgs argument
# because the pkgs argument is always set
# so the `_pkgs == null` branch is not reachable
nixpkgs ? (import ./nix/sources.nix).nixpkgs,
system ? builtins.currentSystem }:
let _pkgs = pkgs; in
let
sources = import ./nix/sources.nix;
overlays = [
(_: super: {
niv = (import sources.niv { }).niv;
# include local sources in your Nix projects, while taking gitignore files into account
# https://github.com/hercules-ci/gitignore.nix
gitignoreSource = (import sources.gitignore { inherit (super) lib; }).gitignoreSource;
})
(import ./overlay.nix)
];
pkgs = (
if _pkgs == null then import nixpkgs {
inherit system; # TODO remove?
inherit overlays;
}
else _pkgs.appendOverlays overlays
);
in {
mvn2nix = pkgs.mvn2nix;
mvn2nix-bootstrap = pkgs.mvn2nix-bootstrap;
buildMavenRepository = pkgs.buildMavenRepository;
buildMavenRepositoryFromLockFile = pkgs.buildMavenRepositoryFromLockFile;
} personally, i prefer unpinned nixpkgs with "update breakage" now and then |
Looks to me like maybe plugin dependencies are being excluded from maven's output now. So |
Maybe we also need to redo the bootstrap? |
In any case, I think this shouldn't be merged. |
so the pom.xml is a generated file, and the generator should be fixed? |
fix build with latest nixpkgs and latest jdk
build error was:
adding missing dependencies to mvn2nix-lock.json does not help, the build fails with another error:
im using mvn2nix in my nur-packages to build mwdumper: