From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1em382-00068l-C2 for guix-patches@gnu.org; Wed, 14 Feb 2018 14:54:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1em37y-0003CQ-An for guix-patches@gnu.org; Wed, 14 Feb 2018 14:54:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35306) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1em37y-0003CL-6n for guix-patches@gnu.org; Wed, 14 Feb 2018 14:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1em37y-00060d-0e for guix-patches@gnu.org; Wed, 14 Feb 2018 14:54:02 -0500 Subject: [bug#30417] [PATCH 05/11] gnu: Add java-sisu-build-api. Resent-Message-ID: Date: Wed, 14 Feb 2018 20:53:33 +0100 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Message-ID: <20180214205333.113684dd@alma-ubu> In-Reply-To: <20180210230438.26794-5-julien@lepiller.eu> References: <20180210234811.40ddec07@lepiller.eu> <20180210230438.26794-5-julien@lepiller.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Julien Lepiller Cc: 30417@debbugs.gnu.org On Sun, 11 Feb 2018 00:04:32 +0100 Julien Lepiller wrote: > * gnu/packages/java.scm (java-sisu-build-api): New variable. > --- > gnu/packages/java.scm | 54 > +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, > 54 insertions(+) >=20 > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm > index 29439d667..af9acd71f 100644 > --- a/gnu/packages/java.scm > +++ b/gnu/packages/java.scm > @@ -2757,6 +2757,60 @@ compilers.") > (description "This package contains the Javac Compiler support > for Plexus Compiler component."))) > =20 > +(define-public java-sisu-build-api > + (package > + (name "java-sisu-build-api") > + (version "0.0.7") > + (source (origin > + (method url-fetch) > + (uri (string-append > "https://github.com/sonatype/sisu-build-api/" > + "archive/plexus-build-api-" > version ".tar.gz")) > + (sha256 > + (base32 > + > "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2")))) > + (build-system ant-build-system) > + (arguments > + `(#:jar-name "sisu-build-api.jar" > + #:source-dir "src/main/java" > + #:jdk ,icedtea-8 > + #:tests? #f; FIXME: how to run the tests? > + #:phases > + (modify-phases %standard-phases > + (add-before 'build 'copy-resurces > + (lambda _ > + (mkdir-p > "build/classes/org/sonatype/plexus/build/incremental") > + (copy-file > "src/main/resources/org/sonatype/plexus/build/incremental/version.propert= ies" > + > "build/classes/org/sonatype/plexus/build/incremental/version.properties") The content of this file is: api.version =3D ${project.version} Is that OK? Or should we better write the correct version into the file? > + #t)) > + (add-before 'build 'generate-plexus-compontent > + (lambda _ > + (mkdir-p "build/classes/META-INF/plexus") > + ;; This file is required for plexus to inject this > package. > + ;; FIXME: how is it generated? > + (with-output-to-file > "build/classes/META-INF/plexus/components.xml" > + (lambda _ > + (display > + "\n > + \n > + \n > + > org.sonatype.plexus.build.incremental.BuildContext\n > + default\n > + > org.sonatype.plexus.build.incremental.DefaultBuildContext= \n > + Filesystem based non-incremental build context > implementation which behaves as if all files\n +were just > created.\n > + \n > + \n > +\n")))))))) R5RS specifies that "with-output-to-file re-turn(s) the value(s) yielded by thunk". As your last call within thunk is "(display..."), the return value is unspecified. Add a "#t" to either the thunk or after (call-with-output-to-file .."). Linter complained about some too long lines, but I think that's OK. At least I wouldn't know how to do better. Otherwise, LGTM. Bj=C3=B6rn