all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Testing the maven build system: Symlink error on duplicate inputs
@ 2020-09-20  8:55 Björn Höfling
  2020-09-20 11:35 ` Julien Lepiller
  0 siblings, 1 reply; 3+ messages in thread
From: Björn Höfling @ 2020-09-20  8:55 UTC (permalink / raw)
  To: guix-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-23 20:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-20  8:55 Testing the maven build system: Symlink error on duplicate inputs Björn Höfling
2020-09-20 11:35 ` Julien Lepiller
2020-10-23 20:54   ` Björn Höfling

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.