all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: guix-devel <guix-devel@gnu.org>
Subject: Testing the maven build system: Symlink error on duplicate inputs
Date: Sun, 20 Sep 2020 10:55:55 +0200	[thread overview]
Message-ID: <20200920105555.7a95f05f@alma-ubu> (raw)

[-- Attachment #1: Type: text/plain, Size: 3588 bytes --]

Hi Julien,
Hi Guix,

thanks for adding the maven-build-system to Guix! This week I found the
time to look over it and tested it. It works great!

First I head a problem with symlinks when I tried out your example from
your git:


(define-public maven-test
+  (let ((commit "775960a985785913fb85428979d253c0b0e1d774")
+        (version "1.0-SNAPSHOT")
+        (revision "0"))
+    (package
+      (name "maven-test")
+      (version (git-version version revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://framagit.org/tyreunom/maven-example-project")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "056p1kc4dpdp8rzxrbp9y0z278hjzpqkrjq63wgcyi0ns5jbc5nv"))))
+      (build-system maven-build-system)
+      (native-inputs
+       `(("maven-resources-plugin" ,maven-resources-plugin)
+         ("maven-compiler-plugin" ,maven-compiler-plugin)
+         ("maven-surefire-plugin" ,maven-surefire-plugin)
+         ("maven-jar-plugin" ,maven-jar-plugin)
+         ("maven-install-plugin" ,maven-install-plugin)
+         ("java-surefire-junit4" ,java-surefire-junit4)))
+      (home-page "")
+      (synopsis "")
+      (description "")
+      ;; Note: this package is generated automatically by maven, which is under asl2.0
+      (license license:asl2.0))))

It failed with 

I would symlink: "/gnu/store/p92knvjyvmg0krb7hlkj4gj8yf64y1r5-maven-resources-plugin-3.1.0/lib/m2/./org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.jar" --> "/tmp/guix-build-maven-test-1.0-SNAPSHOT-0.775960a.drv-0/source/build-home/.m2/repository/./org/apache/maven/plugins/maven-resources-plugin/3.1.0/maven-resources-plugin-3.1.0.jar".
Backtrace:
          10 (primitive-load "/gnu/store/icabl1p2m3xf83hkanpkgzk0mkz?")
In ice-9/eval.scm:
   191:35  9 (_ _)
In guix/build/gnu-build-system.scm:
    838:2  8 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
  1736:10  7 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
   857:16  6 (every1 #<procedure 7ffff4b4c5a0 at guix/build/gnu-bui?> ?)
In guix/build/gnu-build-system.scm:
   847:30  5 (_ _)
In guix/build/maven-build-system.scm:
     55:4  4 (configure #:inputs _)
In ice-9/boot-9.scm:
   260:13  3 (for-each #<procedure 7ffff522cbb8 at guix/build/maven?> ?)
   260:13  2 (for-each #<procedure 7ffff4fc9020 at guix/build/maven?> ?)
In unknown file:
           1 (symlink "/gnu/store/p92knvjyvmg0krb7hlkj4gj8yf64y1r5-?" ?)
In ice-9/boot-9.scm:
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure symlink: File exists

Then I noticed that the configure phase has duplicate inputs and that
lead to the failure. After removing all native-inputs from the example,
I was able to successfully build this Hello-World example.

Would that maybe cause real problems when the same two inputs come from
different dependencies in real-world examples?

I quickly tried to find a real-world problem to play with like slf4j or
Apache Commons, but all had either direct dependencies or
plugin-dependencies.

Does someone have plans to add real-world packages that make use of the
maven-build-system? Next, an automated importer with
dependency-resolution would be nice :-)

Thanks Julien for working on this,

Björn


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

             reply	other threads:[~2020-09-20  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20  8:55 Björn Höfling [this message]
2020-09-20 11:35 ` Testing the maven build system: Symlink error on duplicate inputs Julien Lepiller
2020-10-23 20:54   ` Björn Höfling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200920105555.7a95f05f@alma-ubu \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.