project-info.json missing "authenticated" flag sometimes if dependency has already been fetched into local maven repository #5

Open
trentonstrong opened this Issue Aug 13, 2015 · 9 comments

Comments

Projects
None yet
8 participants
@trentonstrong

My current workaround is to use the following one liner:

mvn -Dmaven.repo.local=mktemp -d -t mavenorg.nixos.mvn2nix:mvn2nix-maven-plugin:mvn2nix

@Profpatsch

This comment has been minimized.

Show comment
Hide comment
@Profpatsch

Profpatsch Mar 15, 2016

Member

Can confirm, for local dependencies that are not available online.

Member

Profpatsch commented Mar 15, 2016

Can confirm, for local dependencies that are not available online.

@grahamc

This comment has been minimized.

Show comment
Hide comment
@grahamc

grahamc Jun 4, 2016

Member

Same here -- trying to build a project-info.json on a big project with no local repo is a bit painful.

Member

grahamc commented Jun 4, 2016

Same here -- trying to build a project-info.json on a big project with no local repo is a bit painful.

@lverns

This comment has been minimized.

Show comment
Hide comment
@lverns

lverns Feb 8, 2017

The workaround given above does indeed work: mvn -Dmaven.repo.local=$(mktemp -d -t maven) org.nixos.mvn2nix:mvn2nix-maven-plugin:mvn2nix.

Could we change the title of this issue to something slightly more descriptive? e.g.

project-info.json missing "authenticated" flag sometimes if dependency has already been fetched into local maven repository.

lverns commented Feb 8, 2017

The workaround given above does indeed work: mvn -Dmaven.repo.local=$(mktemp -d -t maven) org.nixos.mvn2nix:mvn2nix-maven-plugin:mvn2nix.

Could we change the title of this issue to something slightly more descriptive? e.g.

project-info.json missing "authenticated" flag sometimes if dependency has already been fetched into local maven repository.

@shlevy shlevy changed the title from mvn2nix misses "authenticated" flag sometimes if dependency has already been fetched into local maven repository to project-info.json missing "authenticated" flag sometimes if dependency has already been fetched into local maven repository Feb 8, 2017

@kmdouglass

This comment has been minimized.

Show comment
Hide comment
@kmdouglass

kmdouglass May 12, 2017

Unfortunately the workaround does not work for me. I've even tried deleting the default local Maven repository but have had no luck. I'd appreciate any help if someone knows what the problem is.

---EDIT---

I tested the workaround on my system with Maven 3.2.5 in addition to Maven 3.3.9, but am still getting the attribute 'authenticated' missing error.

kmdouglass:~$ uname -a
Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

kmdouglass:~$ mvn --version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.7.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-4-amd64", arch: "amd64", family: "unix"

kmdouglass:~$ nix-build ij2.nix  --show-trace 
error: while evaluating the attribute ‘args’ of the derivation ‘ImageJ’ at /home/kmdouglass/Desktop/workspace/ImageJ_Nix/ij2.nix:5:3:
while evaluating the attribute ‘text’ of the derivation ‘install.sh’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘buildPhase’ of the derivation ‘ij-1.51j.jar’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/build-maven.nix:60:5:
while evaluating the attribute ‘text’ of the derivation ‘settings.xml’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘buildCommand’ of the derivation ‘maven-repository’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘text’ of the derivation ‘build-maven-repository.sh’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating anonymous function at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/build-maven.nix:17:31, called from undefined position:
attribute ‘authenticated’ missing, at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/build-maven.nix:17:39

kmdouglass commented May 12, 2017

Unfortunately the workaround does not work for me. I've even tried deleting the default local Maven repository but have had no luck. I'd appreciate any help if someone knows what the problem is.

---EDIT---

I tested the workaround on my system with Maven 3.2.5 in addition to Maven 3.3.9, but am still getting the attribute 'authenticated' missing error.

kmdouglass:~$ uname -a
Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

kmdouglass:~$ mvn --version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.7.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-4-amd64", arch: "amd64", family: "unix"

kmdouglass:~$ nix-build ij2.nix  --show-trace 
error: while evaluating the attribute ‘args’ of the derivation ‘ImageJ’ at /home/kmdouglass/Desktop/workspace/ImageJ_Nix/ij2.nix:5:3:
while evaluating the attribute ‘text’ of the derivation ‘install.sh’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘buildPhase’ of the derivation ‘ij-1.51j.jar’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/build-maven.nix:60:5:
while evaluating the attribute ‘text’ of the derivation ‘settings.xml’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘buildCommand’ of the derivation ‘maven-repository’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute ‘text’ of the derivation ‘build-maven-repository.sh’ at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating anonymous function at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/build-maven.nix:17:31, called from undefined position:
attribute ‘authenticated’ missing, at /nix/store/6cgxclznakgrwxmccxyb9s5qcyax29rn-nixpkgs-17.09pre106045.7369fd0b51/nixpkgs/pkgs/build-support/build-maven.nix:17:39
@copumpkin

This comment has been minimized.

Show comment
Hide comment
@copumpkin

copumpkin Jun 29, 2017

Member

This is causing trouble for me too

Member

copumpkin commented Jun 29, 2017

This is causing trouble for me too

@copumpkin

This comment has been minimized.

Show comment
Hide comment
@copumpkin

copumpkin Jun 29, 2017

Member

I think this is just caused by this line being hidden behind if (res.getRepository() instanceof RemoteRepository), which I guess is not always the case.

Member

copumpkin commented Jun 29, 2017

I think this is just caused by this line being hidden behind if (res.getRepository() instanceof RemoteRepository), which I guess is not always the case.

@copumpkin

This comment has been minimized.

Show comment
Hide comment
@copumpkin

copumpkin Jun 29, 2017

Member

The better solution though is probably just to amend the builder in nixpkgs to not assume it's there. Something like .authenticated or false would probably be all that it takes. I'll experiment and maybe push up a fix.

Member

copumpkin commented Jun 29, 2017

The better solution though is probably just to amend the builder in nixpkgs to not assume it's there. Something like .authenticated or false would probably be all that it takes. I'll experiment and maybe push up a fix.

@joelthompson

This comment has been minimized.

Show comment
Hide comment
@joelthompson

joelthompson Jun 29, 2017

The workaround also doesn't work for exhibitor, as it has two modules in the top-level project, exhibitor-core and exhibitor-standalone, the latter of which depends on the former, and so it'll always be a local repo.

The workaround also doesn't work for exhibitor, as it has two modules in the top-level project, exhibitor-core and exhibitor-standalone, the latter of which depends on the former, and so it'll always be a local repo.

@datakurre

This comment has been minimized.

Show comment
Hide comment
@datakurre

datakurre Jan 23, 2018

@copumpkin Did you manage to experiment with fixing missing "authenticated" as you mentioned in June?

@copumpkin Did you manage to experiment with fixing missing "authenticated" as you mentioned in June?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment