GNU bug report logs - #32963
[PATCH] guix: ant-build-system: Install resources.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Danny Milosavljevic <dannym@HIDDEN>; Keywords: patch; dated Sun, 7 Oct 2018 09:49:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Oct 2018 09:48:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 07 05:48:56 2018
Received: from localhost ([127.0.0.1]:39047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g95gG-0001IH-1N
	for submit <at> debbugs.gnu.org; Sun, 07 Oct 2018 05:48:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53171)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1g95gE-0001I5-MB
 for submit <at> debbugs.gnu.org; Sun, 07 Oct 2018 05:48:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1g95g8-0000pf-LU
 for submit <at> debbugs.gnu.org; Sun, 07 Oct 2018 05:48:49 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:52212)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dannym@HIDDEN>)
 id 1g95g8-0000os-H2
 for submit <at> debbugs.gnu.org; Sun, 07 Oct 2018 05:48:48 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34505)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1g95g5-00016m-Az
 for guix-patches@HIDDEN; Sun, 07 Oct 2018 05:48:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dannym@HIDDEN>) id 1g95dJ-0006FG-2d
 for guix-patches@HIDDEN; Sun, 07 Oct 2018 05:45:56 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:55234)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dannym@HIDDEN>)
 id 1g95dI-0006Eg-Rz
 for guix-patches@HIDDEN; Sun, 07 Oct 2018 05:45:53 -0400
Received: from localhost.localdomain (84-113-15-225.cable.dynamic.surfer.at
 [84.113.15.225])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id AAD103360169;
 Sun,  7 Oct 2018 11:45:50 +0200 (CEST)
From: Danny Milosavljevic <dannym@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guix: ant-build-system: Install resources.
Date: Sun,  7 Oct 2018 11:45:49 +0200
Message-Id: <20181007094549.4289-1-dannym@HIDDEN>
X-Mailer: git-send-email 2.19.0
MIME-Version: 1.0
Tags: patch
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Danny Milosavljevic <dannym@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

* guix/build/ant-build-system.scm (default-build.xml): Install resources.
---
 guix/build/ant-build-system.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-syste=
m.scm
index d79a2d55e..cb3164211 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -38,7 +38,8 @@
 (define* (default-build.xml jar-name prefix #:optional
                             (source-dir ".") (test-dir "./test") (main-c=
lass #f)
                             (test-include '("**/*Test.java"))
-                            (test-exclude '("**/Abstract*Test.java")))
+                            (test-exclude '("**/Abstract*Test.java"))
+                            (source-resource-dir #f))
   "Create a simple build.xml with standard targets for Ant."
   (call-with-output-file "build.xml"
     (lambda (port)
@@ -81,6 +82,14 @@
                                    (destdir "${classes.dir}")
                                    (classpath (@ (refid "classpath")))))=
)
=20
+                 (target (@ (name "add-resources")
+                            (depends "compile"))
+                  ,(if source-resource-dir
+                      `(copy (@ (todir "${classes.dir}"))
+                             (fileset (@ (dir ,source-resource-dir))
+                                      (include (@ (name "**/*")))))
+                       ""))
+
                  (target (@ (name "compile-tests"))
                          (mkdir (@ (dir "${test.classes.dir}")))
                          (javac (@ (includeantruntime "false")
@@ -116,7 +125,7 @@
                                                        test-exclude)))))
=20
                  (target (@ (name "jar")
-                            (depends "compile, manifest"))
+                            (depends "compile, add-resources, manifest")=
)
                          (mkdir (@ (dir "${jar.dir}")))
                          (exec (@ (executable "jar"))
                                (arg (@ (line ,(string-append "-cmf ${man=
ifest.file} "
@@ -162,7 +171,10 @@ to the default GNU unpack strategy."
     (default-build.xml jar-name
                        (string-append (assoc-ref outputs "out")
                                       "/share/java")
-                       source-dir test-dir main-class test-include test-=
exclude))
+                       source-dir test-dir main-class test-include test-=
exclude
+                       (if (file-exists? "src/main/resources")
+                           "src/main/resources"
+                           #f)))
   (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
   (setenv "CLASSPATH" (generate-classpath inputs))
   #t)




Acknowledgement sent to Danny Milosavljevic <dannym@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#32963; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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