diff --git a/flake.nix b/flake.nix index 82e2cc9..9260d9e 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,24 @@ ]); runScript = "zsh"; }).env; + + packages.default = pkgs.maven.buildMavenPackage { + pname = "keycloak-lists-plugin"; + version = "1.0"; + + src = ./plugin; + + mvnHash = "sha256-UaVCt6KIjR8i3vHVp5YWqu8zzM7mftXyrv5J2jxtw6Q="; + + buildPhase = '' + mvn --offline package; + ''; + + installPhase = '' + mkdir -p $out/share/java + install -Dm644 target/*.jar $out/share/java + ''; + }; }; in flake-utils.lib.eachDefaultSystem out // { diff --git a/plugin/pom.xml b/plugin/pom.xml index 7bc5fd9..3515420 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -103,6 +103,7 @@ + ${project.groupId}-${project.artifactId} \ No newline at end of file diff --git a/plugin/src/main/java/lix/systems/keycloak/FileAllowBansDB.java b/plugin/src/main/java/lix/systems/keycloak/FileAllowBansDB.java index 506bc61..6399eef 100644 --- a/plugin/src/main/java/lix/systems/keycloak/FileAllowBansDB.java +++ b/plugin/src/main/java/lix/systems/keycloak/FileAllowBansDB.java @@ -7,7 +7,6 @@ import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.nio.file.Path; -import java.util.List; import java.util.Set; import java.util.stream.Collectors;