GNU bug report logs - #26803
Java things

Previous Next

Package: guix-patches;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Sat, 6 May 2017 14:02:02 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


Message #224 received at 26803 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Roel Janssen <roel <at> gnu.org>
Cc: Hartmut Goebel <h.goebel <at> crazy-compilers.com>, 26803 <at> debbugs.gnu.org
Subject: Re: bug#26803: [PATCH 15/36] gnu: Add java-commons-io.
Date: Wed, 10 May 2017 16:34:58 +0200
Roel Janssen <roel <at> gnu.org> writes:

> Ricardo Wurmus writes:
>
>> Roel Janssen <roel <at> gnu.org> writes:
>>
>>> Ricardo Wurmus writes:
>>>
>>>> From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
>>>>
>>>> * gnu/packages/java.scm (java-commons-io): New variable.
>>>>
>>>> Co-authored-by: Ricardo Wurmus <rekado <at> elephly.net>
>>>> ---
>> […]
>>>> +    (arguments
>>>> +     `(#:test-target "test"
>>>> +       #:phases
>>>> +       (modify-phases %standard-phases
>>>> +         (add-after 'unpack 'symlink-junit.jar
>>>> +           (lambda* (#:key inputs #:allow-other-keys)
>>>> +             ;; TODO: don't do this; use make-flags
>>>> +             ;; The existence of this file is taken as indicator whether test
>>>> +             ;; dependencies will to be downloaded.
>>>> +             (let ((junit (assoc-ref inputs "java-junit"))
>>>> +                   (junit-version "4.12")) ; from build.xml
>>>> +               (mkdir-p "lib")
>>>> +               (symlink (string-append junit "/share/java/junit.jar")
>>>> +                        (string-append "lib/junit-" junit-version ".jar"))
>>>> +               #t)))
>>>
>>> I'm not sure how the result of the code here could be achieved
>>> using 'make-flags', so is the TODO item referring to an already-removed
>>> piece of code?
>>
>> Oh, I forgot about this.  It’s actually pretty easy to do this with
>> make-flags:
>>
>>        #:make-flags
>>        (list (string-append "-Djunit.jar="
>>                             (assoc-ref %build-inputs "java-junit")
>>                             "/share/java/junit.jar"))
>>
>> Much nicer than symlinking things!
>> I’ll push it with this change.
>
> Yes, definitely.  Very nice!
> Is the "lib" directory automatically created this way?

We don’t need it.  Instead of putting the file where the defaults want
it to be we just tell it to look elsewhere, so no directory needs to be
created at all.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





This bug report was last modified 8 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.