From unknown Mon Jun 16 23:54:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32963 <32963@debbugs.gnu.org> To: bug#32963 <32963@debbugs.gnu.org> Subject: Status: [PATCH] guix: ant-build-system: Install resources. Reply-To: bug#32963 <32963@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:54:05 +0000 retitle 32963 [PATCH] guix: ant-build-system: Install resources. reassign 32963 guix-patches submitter 32963 Danny Milosavljevic severity 32963 normal tag 32963 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 07 05:48:56 2018 Received: (at submit) by debbugs.gnu.org; 7 Oct 2018 09:48:56 +0000 Received: from localhost ([127.0.0.1]:39047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g95gG-0001IH-1N for submit@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 ) id 1g95gE-0001I5-MB for submit@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 ) id 1g95g8-0000pf-LU for submit@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 ) id 1g95g8-0000os-H2 for submit@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 ) id 1g95g5-00016m-Az for guix-patches@gnu.org; Sun, 07 Oct 2018 05:48:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g95dJ-0006FG-2d for guix-patches@gnu.org; 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 ) id 1g95dI-0006Eg-Rz for guix-patches@gnu.org; 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 To: guix-patches@gnu.org Subject: [PATCH] guix: ant-build-system: Install resources. Date: Sun, 7 Oct 2018 11:45:49 +0200 Message-Id: <20181007094549.4289-1-dannym@scratchpost.org> 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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)