Open zeratax opened 1 year ago
here is the relevant code
repo = linkFarm "maven-repository" (lib.forEach dependencies (dependency: {
name = dependency.layout;
path = dependency.drv;
}));
That must mean the dependencies are present more than once?
I'll try to investigate this weekend unless you had made progress.
The spigot-api dependecy seems to be twice in the project.json
:
but it also complains about this metadata file if i remove one of the duplicate spigot-api dependencies:
error: builder for '/nix/store/rxjwq5prv7sjam1id8wmq24mc92m9qsi-maven-repository.drv' failed with exit code 1;
last 1 log lines:
> ln: failed to create symbolic link 'org/bukkit/bukkit/1.12.2-R0.1-SNAPSHOT/maven-metadata-spigotmc-repo.xml': File exists
That metadata is defined by both a pom and jar with the same name:
removing additionally either one of the bukkit dependencies and one of the duplicate spigot-api dependencies it will then complain about spigot-api missing, even though it to me looks like it is just a duplicate?
[ERROR] Failed to execute goal on project Harbor: Could not resolve dependencies for project
xyz.nkomarn:Harbor:jar:1.6.3: The following artifacts could not be resolved: org.spigotmc:spigot-api:jar:1.14.4-R0.1-SNAPSHOT, net.md-5:bungeecord-chat:jar:1.13-SNAPSHOT, io.papermc:paperlib:jar:1.0.2, org.bukkit:bukkit:jar:1.12.2-R0.1-SNAPSHOT:
Cannot access spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/) in offline mode and the artifact org.spigotmc:spigot-api:jar:1.14.4-R0.1-20191210.224154-92 has not been downloaded from it before.
-> [Help 1]
Edit: those tests are with the project file for 1.6.3
of harbor on main is 1.6.4
right now. But the issue are essentially the same, just with more duplicates.
Easy to see find the duplicate metadata files via:
$ curl -sL "https://github.com/zeratax/nur-packages/blob/master/pkgs/bukkit-plugins/harbor/project-info.json?raw=true" |
jq ".dependencies |
group_by(.metadata) |
map(select(length>1) | .[0])"
Describe the bug
A maven project doesn't build any longer probably since #100634
https://github.com/zeratax/nur-packages/blob/39e82f546c9dca6431d15d9ca179ef912104a8cd/pkgs/bukkit-plugins/harbor/default.nix
which is a derivation for https://github.com/nkomarn/harbor/tree/1.6.3
not sure if this is so much a
buildMaven
issue or a issue with theproject.json
which it uses so i filed an issue here too: https://github.com/NixOS/mvn2nix-maven-plugin/issues/30Steps To Reproduce
Steps to reproduce the behavior:
project.json
with https://github.com/NixOS/mvn2nix-maven-pluginI assume this requires a maven project with cyclic dependencies
Additional context
Notify maintainers
@fzakaria
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.