From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH] gnu: java-jmh: Switch to maven-build-system. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162250088214923 (code B ref -1); Mon, 31 May 2021 22:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 31 May 2021 22:41:22 +0000 Received: from localhost ([127.0.0.1]:35146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqb4-0003sd-0j for submit@debbugs.gnu.org; Mon, 31 May 2021 18:41:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:37600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqb2-0003sU-AJ for submit@debbugs.gnu.org; Mon, 31 May 2021 18:41:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnqb1-0005rN-PO for guix-patches@gnu.org; Mon, 31 May 2021 18:41:20 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:56370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnqaz-00050W-SO for guix-patches@gnu.org; Mon, 31 May 2021 18:41:19 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 1458c6ed for ; Mon, 31 May 2021 22:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=dkim; bh=aOVyJAQuIH3mNyloyBThUG1Xy 3g14+7s45oMmC1cbOg=; b=jioSG850vO1DFs3SKXCyhqBGT07EwfMZsEW0sTAmB p0YInJUikc+MpOn1COUBOKSlsiFHNmxEqIl4wgFZ2zi1K3EXK5bfgCZHi2ZCEuSw 2PJWZNNl3yqOv7HGBxNzTcBxfvOKKHvma4YnbG5BTUp7t9iPjpMdLWMAuL8b1idv cmKjSdAhwdQIVb4AhsbkOranx5f3Bw8NLR4pEIkb6FfDnLuls6DJ+eD/20us8Vp1 uYb18OqjxfHcElT1Fh+ffkIkn6KEnP/L5xN9X6EGF83mSr4BcHWjpp/VHx2Pccz5 nv2dNsuCSdxp3IHK6a9c43GgayqmqpLjG3ghMMPpRkpNQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id f3262e78 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Mon, 31 May 2021 22:41:08 +0000 (UTC) Date: Tue, 1 Jun 2021 00:41:00 +0200 From: Julien Lepiller Message-ID: <20210601004100.69baa2d0@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) Hi Guix! I'm excited to submit this patch series, as it adds the first package to guix that uses the maven-build-system. The series first improves the maven build system, so it actually works with jmh :) The series then changes a few dependencies to install to the maven repository structure (lib/m2), so they can be detected by maven during the build. Since the series updates files that are used by the ant-build-system, it unfortunately needs to update all java packages. Grepping for "build-system ant-build-system", it shows 302 packages, which is two packages above the limit for master. However, since most java packages are fast to build, I'd like to ask for an exception to this rule and push to master directly. Patches will follow :) From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 01/14] guix: java-utils: Factorize pom.xml generation. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250108215247 (code B ref 48766); Mon, 31 May 2021 22:45:02 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:44:42 +0000 Received: from localhost ([127.0.0.1]:35153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeH-0003xl-Fi for submit@debbugs.gnu.org; Mon, 31 May 2021 18:44:42 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeE-0003xU-IO for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:39 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id d129670f for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=i7rvmpP/Dgx5CKG3H5DCx3U9c Q9iuqG43Mudu0GlC7w=; b=h2ijERO7SMvVxLwdLj3g9Nm6yKrT9RpuMX8yMjV18 OV60MYpJiP4c9OlxYPgj+aTzixXnxKyWo6FAjnVNDNlSC5ZzmRjuTU40eNSNSGjr U4WoT6SP4XawDou3ucp+i47QSMFTb+opS1md0yg6wZ/mx5bGMpEqydw30IFFEcSg O+xoVzsYqlQ2Ay4yWcTik66n+GQQtKpQyfIrTn/uzEdrUJxJjpEjDBS+TWdnntY1 xBJJq69ku8HWJltewr3f/4vjkFilN7Z1phw6v/cW8ZvfEaF+opI/S14f2ld31BmC gnvupRFq49AT16Iuh32CXqML0hOOy+QD66jmvORco4ZUQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id c06cd71f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:36 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:14 +0200 Message-Id: <20210531224427.13300-1-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210601004100.69baa2d0@tachikoma.lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/java-utils.scm (generate-pom.xml): New procedure. * gnu/packages/maven.scm (java-surefire-junit4): Use it. * gnu/packages/java.scm (java-qdox, java-jsr250, java-jsr305) (java-aopalliance, java-jboss-el-api-spec) (java-jboss-interceptors-api-spec): Use it. (java-qdox-M9): Ensure the generated pom file has the correct version. --- gnu/packages/java.scm | 117 ++++++-------------------------------- gnu/packages/maven.scm | 28 ++++----- guix/build/java-utils.scm | 29 ++++++++++ 3 files changed, 58 insertions(+), 116 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a167aafc38..d7118b4ce6 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -3781,25 +3781,11 @@ documentation tools.") (arguments `(#:jar-name "qdox.jar" #:tests? #f; no tests - #:modules - ((guix build ant-build-system) - (guix build java-utils) - (guix build utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "QDox") - (groupId "com.thoughtworks.qdox") - (artifactId "qdox") - (version ,,version)))))) - #t)) + (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version + #:name "QDox")) (replace 'install (install-from-pom "pom.xml"))))) (home-page "https://github.com/codehaus/qdox") @@ -3825,7 +3811,14 @@ documentation tools.") "/qdox-" version "-sources.jar")) (sha256 (base32 - "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))))) + "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))) + (arguments + (substitute-keyword-arguments (package-arguments java-qdox) + ((#:phases phases) + `(modify-phases ,phases + (replace 'create-pom + (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version + #:name "QDox")))))))) (define-public java-jarjar (package @@ -6397,25 +6390,11 @@ bottlenecks move away from the database in an effectively cached system.") `(#:tests? #f ; no tests included #:jdk ,icedtea-8 #:jar-name "jsr250.jar" - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "jsr250") - (groupId "javax.annotation") - (artifactId "jsr250-api") - (version ,,version)))))) - #t)) + (generate-pom.xml "pom.xml" "javax.annotation" "jsr250-api" ,version + #:name "jsr250")) (replace 'install (install-from-pom "pom.xml"))))) (home-page "https://jcp.org/en/jsr/detail?id=250") @@ -6444,25 +6423,10 @@ namespaces.") (arguments `(#:tests? #f ; no tests included #:jar-name "jsr305.jar" - #:modules ((guix build ant-build-system) - (guix build java-utils) - (guix build maven pom) - (guix build utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "jsr305") - (groupId "com.google.code.findbugs") - (artifactId "jsr305") - (version ,,version)))))) - #t)) + (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version)) (replace 'install (install-from-pom "pom.xml"))))) (home-page "http://findbugs.sourceforge.net/") @@ -10493,25 +10457,10 @@ this is not a static analysis tool.)") #:jdk ,icedtea-8 #:tests? #f; no tests #:source-dir "aopalliance/src/main" - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "aopalliance") - (groupId "aopalliance") - (artifactId "aopalliance") - (version "1.0")))))) - #t)) + (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version)) (replace 'install (install-from-pom "pom.xml"))))) (home-page "http://aopalliance.sourceforge.net") @@ -12110,29 +12059,14 @@ sequences to format your console output which works on every platform.") (build-system ant-build-system) (arguments `(#:jar-name "java-jboss-el-api_spec.jar" - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases ;; the origin of javax.el:javax.el-api is unknown, so we use this package ;; instead, which implements the same thing. We override the pom file ;; to "rename" the package so it can be found by maven. (add-before 'install 'override-pom - (lambda _ - (delete-file "pom.xml") - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `(project - (modelVersion "4.0.0") - (name "el-api") - (groupId "javax.el") - (artifactId "javax.el-api") - (version "3.0"))))) - #t)) + (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0" + #:name "el-api")) (replace 'install (install-from-pom "pom.xml"))))) (inputs @@ -12164,11 +12098,6 @@ JavaServer Pages (JSP).") #:jdk ,icedtea-8 #:source-dir "." #:tests? #f; no tests - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases ;; the origin of javax.interceptor:javax.interceptor-api is unknown, @@ -12176,18 +12105,8 @@ JavaServer Pages (JSP).") ;; We override the pom file to "rename" the package so it can be found ;; by maven. (add-before 'install 'override-pom - (lambda _ - (delete-file "pom.xml") - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `(project - (modelVersion "4.0.0") - (name "interceptor-api") - (groupId "javax.interceptor") - (artifactId "javax.interceptor-api") - (version "3.0"))))) - #t)) + (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api" + "3.0" #:name "interceptor-api")) (replace 'install (install-from-pom "pom.xml"))))) (home-page "https://github.com/jboss/jboss-interceptors-api_spec") diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index c637e5c7ae..8f63ee9be2 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -3424,23 +3424,17 @@ starting from JUnit 4."))) #:phases (modify-phases %standard-phases (add-before 'install 'regenerate-own-pom - (lambda _ - ;; Surefire struggles resolving artifacts because of this pom - ;; file, resulting in a NullPointerException when collecting - ;; Artifacts (and a "Failure detected." message from - ;; DefaultArtifactResolver). Replace the pom file with a much - ;; simpler one. Everything is shaded anyway (as used to be the - ;; case in 2.22), so there will not be missing dependencies. - (with-output-to-file "surefire-providers/surefire-junit4/pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "Surefire JUnit4") - (groupId "org.apache.maven.surefire") - (artifactId "surefire-junit4") - (version ,,(package-version java-surefire-common-java5))))))) - #t)) + ;; Surefire struggles resolving artifacts because of this pom + ;; file, resulting in a NullPointerException when collecting + ;; Artifacts (and a "Failure detected." message from + ;; DefaultArtifactResolver). Replace the pom file with a much + ;; simpler one. Everything is shaded anyway (as used to be the + ;; case in 2.22), so there will not be missing dependencies. + (generate-pom.xml + "surefire-providers/surefire-junit4/pom.xml" + "org.apache.maven.surefire" "surefire-junit4" + ,(package-version java-surefire-common-java5) + #:name "Surefire JUnit4")) (add-before 'build 'copy-resources (lambda _ (mkdir-p "build/classes") diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm index a868e4d52c..6abd97e118 100644 --- a/guix/build/java-utils.scm +++ b/guix/build/java-utils.scm @@ -28,6 +28,7 @@ #:use-module (sxml simple) #:export (ant-build-javadoc generate-plugin.xml + generate-pom.xml install-jars install-javadoc install-pom-file @@ -206,3 +207,31 @@ recognize the package as a plugin, and find the entry points in the plugin." ,mojos (dependencies ,@dependencies))))))))) + +(define* (generate-pom.xml pom-file groupid artifactid version + #:key (dependencies '()) + (name artifactid)) + "Generates the @file{pom.xml} for a project. It is required by Maven to find +a package, and by the java build system to know where to install a package, when +a pom.xml doesn't already exist and installing to the maven repository." + (lambda _ + (mkdir-p (dirname pom-file)) + (with-output-to-file pom-file + (lambda _ + (sxml->xml + (sxml-indent + `(project + (modelVersion "4.0.0") + (name ,name) + (groupId ,groupid) + (artifactId ,artifactid) + (version ,version) + (dependencies + ,@(map + (match-lambda + ((groupid artifactid version) + `(dependency + (groupId ,groupid) + (artifactId ,artifactid) + (version ,version)))) + dependencies))))))))) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 02/14] guix: maven: Simplify finding version and group information. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250108715304 (code B ref 48766); Mon, 31 May 2021 22:45:02 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:44:47 +0000 Received: from localhost ([127.0.0.1]:35164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeM-0003ye-Ci for submit@debbugs.gnu.org; Mon, 31 May 2021 18:44:47 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeG-0003xU-5F for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:40 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 1dc37eba for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=ryCiWPE+SjFA 7IrWGVB6IxXqOinM+4dWvJxi8ehIRSM=; b=VCV+xWmuHz9oEprbANAlFRTnCGXV BnG4bz7P04QuefL7FSzACA2jigC3WehCDI1rMO0gMm37xo3OvD5cAxnPLJenJsLR ieAFN33dfGi0ifRxW9GaXBYutSHtZzcoWXYCoQuWrTxncVH9ZvrwYVN/gdyO/z+k ZHfboWMO92dCz/k4MwDxm8PJi6IX3vLcKwuYAxuNnae71EfHM+ouUvX18EVWNg9y l6HfjF3+oXkjQfUvb4XwY15YDl4DLd5+9SQUAnhNVhx46wHv1uRSOivR+nJfaZxX Ve23AhYrw02++2rcNsS6Q1/HbNNrLpIK0c23NGKeYJ7A2v2Ld201K96aRw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 193a8294 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:36 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:15 +0200 Message-Id: <20210531224427.13300-2-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/maven/pom.scm (pom-version, pom-groupid): Do not use inputs and local packages information anymore. Adapt file to new arguments. * guix/build/maven-build-system.scm: Adapt to new arguments. * guix/build/java-utils.scm: Adapt to new arguments. --- guix/build/java-utils.scm | 18 +++++++++--------- guix/build/maven-build-system.scm | 6 +++--- guix/build/maven/pom.scm | 26 ++++++++++++-------------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm index 6abd97e118..5a54a14c1b 100644 --- a/guix/build/java-utils.scm +++ b/guix/build/java-utils.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2018 Alex Vong -;;; Copyright © 2020 Julien Lepiller +;;; Copyright © 2020, 2021 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -69,9 +69,9 @@ fetched." (let* ((out (assoc-ref outputs "out")) (java-inputs (append (map cdr inputs) (map cdr outputs))) (pom-content (get-pom pom-file)) - (version (pom-version pom-content java-inputs)) + (version (pom-version pom-content)) (artifact (pom-artifactid pom-content)) - (group (group->dir (pom-groupid pom-content java-inputs))) + (group (group->dir (pom-groupid pom-content))) (repository (string-append out "/lib/m2/" group "/" artifact "/" version "/")) (pom-name (string-append repository artifact "-" version ".pom"))) @@ -87,8 +87,8 @@ to ensure that maven can find dependencies." (manifest (string-append dir "/META-INF/MANIFEST.MF")) (pom (get-pom pom-file)) (artifact (pom-artifactid pom)) - (group (pom-groupid pom inputs)) - (version (pom-version pom inputs)) + (group (pom-groupid pom)) + (version (pom-version pom)) (pom-dir (string-append "META-INF/maven/" group "/" artifact))) (mkdir-p (string-append dir "/" pom-dir)) (copy-file pom-file (string-append dir "/" pom-dir "/pom.xml")) @@ -113,9 +113,9 @@ the phase fails." (let* ((out (assoc-ref outputs "out")) (java-inputs (append (map cdr inputs) (map cdr outputs))) (pom-content (get-pom pom-file)) - (version (pom-version pom-content java-inputs)) + (version (pom-version pom-content)) (artifact (pom-artifactid pom-content)) - (group (group->dir (pom-groupid pom-content java-inputs))) + (group (group->dir (pom-groupid pom-content))) (repository (string-append out "/lib/m2/" group "/" artifact "/" version "/")) ;; We try to find the file that was built. If it was built from our @@ -180,9 +180,9 @@ recognize the package as a plugin, and find the entry points in the plugin." (name (pom-name pom-content)) (description (pom-description pom-content)) (dependencies (pom-dependencies pom-content)) - (version (pom-version pom-content java-inputs)) + (version (pom-version pom-content)) (artifact (pom-artifactid pom-content)) - (groupid (pom-groupid pom-content java-inputs)) + (groupid (pom-groupid pom-content)) (mojos `(mojos ,@(with-directory-excursion directory diff --git a/guix/build/maven-build-system.scm b/guix/build/maven-build-system.scm index 534b4ebcee..0456bfdf61 100644 --- a/guix/build/maven-build-system.scm +++ b/guix/build/maven-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2020 Julien Lepiller +;;; Copyright © 2020, 2021 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -82,8 +82,8 @@ (let* ((pom (get-pom pom-file)) (java-inputs (map cdr inputs)) (artifact (pom-artifactid pom)) - (group (pom-groupid pom java-inputs local-packages)) - (version (pom-version pom java-inputs local-packages))) + (group (pom-groupid pom)) + (version (pom-version pom))) (let loop ((modules (pom-ref pom "modules")) (local-packages (add-local-package local-packages group artifact version))) diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index c92d409d2b..327d5f75e8 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019, 2020 Julien Lepiller +;;; Copyright © 2019-2021 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -93,13 +93,12 @@ If no result is found, the result is @code{#f}." (get-pom (car java-inputs)))) #f))) -(define* (pom-groupid content inputs #:optional local-packages) +(define* (pom-groupid content) "Find the groupID of a pom file, potentially looking at its parent pom file. See @code{find-parent} for the meaning of the arguments." (if content (let ((res (or (pom-ref content "groupId") - (pom-groupid (find-parent content inputs local-packages) - inputs)))) + (pom-ref (pom-ref content "parent") "groupId")))) (cond ((string? res) res) ((null? res) #f) @@ -114,13 +113,12 @@ See @code{find-parent} for the meaning of the arguments." (car res) #f))) -(define* (pom-version content inputs #:optional local-packages) +(define* (pom-version content) "Find the version of a pom file, potentially looking at its parent pom file. See @code{find-parent} for the meaning of the arguments." (if content (let ((res (or (pom-ref content "version") - (pom-version (find-parent content inputs local-packages) - inputs)))) + (pom-ref (pom-ref content "parent") "version")))) (cond ((string? res) res) ((null? res) #f) @@ -344,7 +342,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." ((tag rest ...) (match tag (('http://maven.apache.org/POM/4.0.0:plugin plugin ...) - (let ((group (or (pom-groupid plugin inputs) "org.apache.maven.plugins")) + (let ((group (or (pom-groupid plugin) "org.apache.maven.plugins")) (artifact (pom-artifactid plugin))) (if (member artifact (or (assoc-ref excludes group) '())) (fix-plugins rest optional?) @@ -355,11 +353,11 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." (define* (fix-plugin plugin #:optional optional?) (let* ((artifact (pom-artifactid plugin)) - (group (or (pom-groupid plugin inputs) "org.apache.maven.plugins")) + (group (or (pom-groupid plugin) "org.apache.maven.plugins")) (version (or (assoc-ref (assoc-ref local-packages group) artifact) (find-version inputs group artifact optional?) - (pom-version plugin inputs)))) - (if (pom-version plugin inputs) + (pom-version plugin)))) + (if (pom-version plugin) (map (lambda (tag) (match tag @@ -373,7 +371,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." (define* (fix-dep dep #:optional optional?) (let* ((artifact (pom-artifactid dep)) - (group (or (pom-groupid dep inputs) (pom-groupid pom inputs))) + (group (or (pom-groupid dep) (pom-groupid pom))) (scope (pom-ref dep "scope")) (is-optional? (equal? (pom-ref dep "optional") '("true")))) (format (current-error-port) "maven: ~a:~a :: ~a (optional: ~a)~%" @@ -382,8 +380,8 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." with-build-dependencies?) (let ((version (or (assoc-ref (assoc-ref local-packages group) artifact) (find-version inputs group artifact optional?) - (pom-version dep inputs)))) - (if (pom-version dep inputs) + (pom-version dep)))) + (if (pom-version dep) (map (lambda (tag) (match tag -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 03/14] guix: maven: Simplify finding local packages and modules. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250108815323 (code B ref 48766); Mon, 31 May 2021 22:45:02 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:44:48 +0000 Received: from localhost ([127.0.0.1]:35167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeN-0003yn-3n for submit@debbugs.gnu.org; Mon, 31 May 2021 18:44:47 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeH-0003xU-6F for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:41 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 15afc781 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=x9j5kH3FOdCmNm0+E8DBhWJd3 Y3O+O8HgQhlV6PwBMI=; b=TqKECMyNkOV/KiwN59vHxYLQUN89uV7tHk863QcaQ QED0AR/sujxO0pltR91fibxwROIX2nYwIfmvhIn6ymuwzF+kyWRb9I12JjlVIMFO gs1tiR+6ERn9n6/8InJdEgZcEmV3/SvHSwQv7Y29RUuhHgPc4Z5rKy/6WSsVyCc3 nm/S7GOSSZPfd+XbUXnpz4ZOoGRxbiiq+CPfch3sQQkzlKevigrPa3iYJKuQZP/4 eB0u07+ujbehgbR3dZ71o7C/YlNCbPHBGUhJpVoMELBxytt6zYXxwbMHD8sLeuzx s/btw4mvDT/xUXu2/upBtCjvajg6wXe3fyh09ZPSXWhIw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id a4e62644 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:37 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:16 +0200 Message-Id: <20210531224427.13300-3-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/maven-build-system (fix-pom): Fix a single pom file without recursing (fix-pom-files): Find local packages and all submodules, and fix them all at once. (add-local-package): Move to... * guix/build/maven/pom.scm (add-local-package): ...here. (pom-and-submodules, pom-local-packages): New procedures. --- guix/build/maven-build-system.scm | 41 +++++------------------- guix/build/maven/pom.scm | 53 ++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 34 deletions(-) diff --git a/guix/build/maven-build-system.scm b/guix/build/maven-build-system.scm index 0456bfdf61..374fa2fdb8 100644 --- a/guix/build/maven-build-system.scm +++ b/guix/build/maven-build-system.scm @@ -60,47 +60,22 @@ (invoke "mvn" "-v") #t) -(define (add-local-package local-packages group artifact version) - (define (alist-set lst key val) - (match lst - ('() (list (cons key val))) - (((k . v) lst ...) - (if (equal? k key) - (cons (cons key val) lst) - (cons (cons k v) (alist-set lst key val)))))) - (alist-set local-packages group - (alist-set (or (assoc-ref local-packages group) '()) artifact - version))) - (define (fix-pom pom-file inputs local-packages excludes) (chmod pom-file #o644) (format #t "fixing ~a~%" pom-file) (fix-pom-dependencies pom-file (map cdr inputs) #:with-plugins? #t #:with-build-dependencies? #t #:local-packages local-packages - #:excludes excludes) - (let* ((pom (get-pom pom-file)) - (java-inputs (map cdr inputs)) - (artifact (pom-artifactid pom)) - (group (pom-groupid pom)) - (version (pom-version pom))) - (let loop ((modules (pom-ref pom "modules")) - (local-packages - (add-local-package local-packages group artifact version))) - (pk 'local-packages local-packages) - (match modules - (#f local-packages) - ('() local-packages) - (((? string? _) modules ...) - (loop modules local-packages)) - (((_ module) modules ...) - (loop - modules - (fix-pom (string-append (dirname pom-file) "/" module "/pom.xml") - inputs local-packages excludes))))))) + #:excludes excludes)) (define* (fix-pom-files #:key inputs local-packages exclude #:allow-other-keys) - (fix-pom "pom.xml" inputs local-packages exclude) + (let ((local-packages (pom-local-packages "pom.xml" #:local-packages local-packages))) + (format (current-error-port) "Fix pom files with local packages: ~a~%" local-packages) + (for-each + (lambda (pom) + (when (file-exists? pom) + (fix-pom pom inputs local-packages exclude))) + (pom-and-submodules "pom.xml"))) #t) (define* (build #:key outputs #:allow-other-keys) diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index 327d5f75e8..8f16cf4d26 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm @@ -21,7 +21,8 @@ #:use-module (system foreign) #:use-module (ice-9 match) #:use-module (srfi srfi-1) - #:export (get-pom + #:export (add-local-package + get-pom pom-ref pom-description pom-name @@ -30,8 +31,24 @@ pom-groupid pom-dependencies group->dir + pom-and-submodules + pom-local-packages fix-pom-dependencies)) +(define (add-local-package local-packages group artifact version) + "Takes @var{local-packages}, a list of local packages, and adds a new one +for @var{group}:@var{artifact} at @var{version}." + (define (alist-set lst key val) + (match lst + ('() (list (cons key val))) + (((k . v) lst ...) + (if (equal? k key) + (cons (cons key val) lst) + (cons (cons k v) (alist-set lst key val)))))) + (alist-set local-packages group + (alist-set (or (assoc-ref local-packages group) '()) artifact + version))) + (define (get-pom file) "Return the content of a @file{.pom} file." (let ((pom-content (call-with-input-file file xml->sxml))) @@ -234,6 +251,40 @@ to re-declare the namespaces in the top-level element." http://maven.apache.org/xsd/maven-4.0.0.xsd")) ,(map fix-xml sxml))))) +(define (pom-and-submodules pom-file) + "Given @var{pom-file}, the file name of a pom, return the list of pom file +names that correspond to itself and its submodules, recursively." + (define (get-modules modules) + (match modules + (#f '()) + ('() '()) + (((? string? _) rest ...) (get-modules rest)) + ((('http://maven.apache.org/POM/4.0.0:module mod) rest ...) + (let ((pom (string-append (dirname pom-file) "/" mod "/pom.xml"))) + (if (file-exists? pom) + (cons pom (get-modules rest)) + (get-modules rest)))))) + + (let* ((pom (get-pom pom-file)) + (modules (get-modules (pom-ref pom "modules")))) + (cons pom-file + (apply append (map pom-and-submodules modules))))) + +(define* (pom-local-packages pom-file #:key (local-packages '())) + "Given @var{pom-file}, a pom file name, return a list of local packages that +this repository contains." + (let loop ((modules (pom-and-submodules pom-file)) + (local-packages local-packages)) + (match modules + (() local-packages) + ((module modules ...) + (let* ((pom (get-pom module)) + (version (pom-version pom)) + (artifactid (pom-artifactid pom)) + (groupid (pom-groupid pom))) + (loop modules + (add-local-package local-packages groupid artifactid version))))))) + (define (group->dir group) "Convert a group ID to a directory path." (string-join (string-split group #\.) "/")) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 04/14] guix: maven: Support fixing extensions. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250108815330 (code B ref 48766); Mon, 31 May 2021 22:45:03 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:44:48 +0000 Received: from localhost ([127.0.0.1]:35170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeN-0003z6-Vm for submit@debbugs.gnu.org; Mon, 31 May 2021 18:44:48 -0400 Received: from lepiller.eu ([89.234.186.109]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeH-0003xm-UA for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:42 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id f50dd7e6 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=NIPuzvf2Ja6WklkImfi6QaEhH wOdro1G+CUVqogUohY=; b=LWHnCWqbmtglgGADkJ0pWaV7XWKtjfN0ZOeUMyBA2 5CB53dpytz18jwT7JcmoiIQTT4YWlzs6G0r5MWGqFS4+AuR2ONA9eKt6izv25LcI wUQVoc3G6WmnFLk9vyuJhMQMndOK2oRqJpBkEyPowc5QfnaXZ5nXJqUDDye8f+A1 +fd6OmHIe7Tpb/RqCJ8pydwn4W3p89ctr2LWKHPbScWqXBCWCbbCFmO/DefO+a2P p0SOTl4326AkiLgAd2aGsPtqiFzTPPW6rR5HxT+3IfT6JSUOD8zWucbZa7WxNCrm IMtJ67YcRBQSHOrUCmOjXNQOsbcMEPJbFUkFTWHGu7Eeg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 05722e43 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:37 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:17 +0200 Message-Id: <20210531224427.13300-4-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/maven/pom.scm (fix-pom-dependencies): Add support for fixing extension versions. --- guix/build/maven/pom.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index 8f16cf4d26..3a4ad7a216 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm @@ -374,8 +374,27 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." `((http://maven.apache.org/POM/4.0.0:plugins ,(fix-plugins plugins)) ,@(fix-build rest))) + (('http://maven.apache.org/POM/4.0.0:extensions extensions ...) + `((http://maven.apache.org/POM/4.0.0:extensions + ,(fix-extensions extensions)) + ,@(fix-build rest))) (tag (cons tag (fix-build rest))))))) + (define* (fix-extensions extensions #:optional optional?) + (match extensions + ('() '()) + ((tag rest ...) + (match tag + (('http://maven.apache.org/POM/4.0.0:extension extension ...) + (let ((group (or (pom-groupid extension) "org.apache.maven.plugins")) + (artifact (pom-artifactid extension))) + (if (member artifact (or (assoc-ref excludes group) '())) + (fix-extensions rest optional?) + `((http://maven.apache.org/POM/4.0.0:extension + ,(fix-plugin extension optional?)); extensions are similar to plugins + ,@(fix-extensions rest optional?))))) + (tag (cons tag (fix-extensions rest optional?))))))) + (define fix-management (match-lambda ('() '()) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 05/14] guix: maven: Support fixing modules. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250108815337 (code B ref 48766); Mon, 31 May 2021 22:45:04 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:44:48 +0000 Received: from localhost ([127.0.0.1]:35172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeO-0003zD-8J for submit@debbugs.gnu.org; Mon, 31 May 2021 18:44:48 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeI-0003xU-7g for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:42 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 8a3cc6ef for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=Apj/7mxqi0l88qNpqPTNLXM75 2wPyC5+tF3uIPw6J1c=; b=Ye6TCoTcS07Oecqj4KlU1Un79M4HlgStNuQ+hVa+9 e9W5Z1Lt0eFoToc/qrErOlCGnWuf49oWbUxRqsLEfCpGj1SAUl/HSHCTkMTP1Ndv ZasqnX/yI1d5seTKj2x+uCcEQjHDywkH/wuXgr7hFxPCQxbsrHml/IqZ8KnfLdLg mA6SiCSGr3LFf3zeygSzJiEGsnD4aR4GiSqhmGka+3Jx5DE/JjY32xmA2zu2kIGt ArJ0XVr9N0QSjmI20pDw0c38mI7NAj84PuhgjYhZ2SoRkT+Rhw1s2H84A+83+JH8 Pcywt1c70tfuLibtSANeDVWZycozqAd5q8/mDpTfNteBA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id ea965aa7 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:38 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:18 +0200 Message-Id: <20210531224427.13300-5-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/maven/pom.scm (fix-pom-dependencies): Support fixing modules that do not exist. * guix/build/maven-build-system.scm (fix-pom): Fix modules. --- guix/build/maven-build-system.scm | 1 + guix/build/maven/pom.scm | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/guix/build/maven-build-system.scm b/guix/build/maven-build-system.scm index 374fa2fdb8..b3d97c81ea 100644 --- a/guix/build/maven-build-system.scm +++ b/guix/build/maven-build-system.scm @@ -65,6 +65,7 @@ (format #t "fixing ~a~%" pom-file) (fix-pom-dependencies pom-file (map cdr inputs) #:with-plugins? #t #:with-build-dependencies? #t + #:with-modules? #t #:local-packages local-packages #:excludes excludes)) diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index 3a4ad7a216..ffb4515179 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm @@ -291,7 +291,8 @@ this repository contains." (define* (fix-pom-dependencies pom-file inputs #:key with-plugins? with-build-dependencies? - (excludes '()) (local-packages '())) + with-modules? (excludes '()) + (local-packages '())) "Open @var{pom-file}, and override its content, rewritting its dependencies to set their version to the latest version available in the @var{inputs}. @@ -339,8 +340,24 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." `((http://maven.apache.org/POM/4.0.0:build ,(fix-build build)) ,@(fix-pom rest)) (cons tag (fix-pom rest)))) + (('http://maven.apache.org/POM/4.0.0:modules modules ...) + (if with-modules? + `((http://maven.apache.org/POM/4.0.0:modules ,(fix-modules modules)) + ,@(fix-pom rest)) + (cons tag (fix-pom rest)))) (tag (cons tag (fix-pom rest))))))) + (define fix-modules + (match-lambda + ('() '()) + ((tag rest ...) + (match tag + (('http://maven.apache.org/POM/4.0.0:module module) + (if (file-exists? (string-append (dirname pom-file) "/" module "/pom.xml")) + `((http://maven.apache.org/POM/4.0.0:module ,module) ,@(fix-modules rest)) + (fix-modules rest))) + (tag (cons tag (fix-modules rest))))))) + (define fix-dep-management (match-lambda ('() '()) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 06/14] guix: maven: Look in local packages when searching for package version. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250108915344 (code B ref 48766); Mon, 31 May 2021 22:45:04 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:44:49 +0000 Received: from localhost ([127.0.0.1]:35174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeO-0003zK-J1 for submit@debbugs.gnu.org; Mon, 31 May 2021 18:44:48 -0400 Received: from lepiller.eu ([89.234.186.109]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeI-0003xm-Pc for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:43 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id fe675ec0 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=OL9jAiIKyAKCxJSuSThYHbMwS 3bmFBKimqChJnSDkeM=; b=azXM5861rWUzAR49UfNL3zp3a6NCF/vk6iIcWwp6K 2NynYScikoLqcY3wEqd67Z+5AWC33kmyv8eGEnifyt7tJ8ekBd14W5VGfLosXVmg 1uoOOkMhJkUm9s5uzQUks1j+XENnkNzUQBYx07LPHMR1+Qbwikp26WC509dkjOn4 zhRg4UmE8JNoebWwiUsXrAmpR0cjIN4tVtz4rknXIoXOCHUeeW1TpW5WNrju9gCe OFm7EixcA3IqOkJx6puC9rTJQYEBBmPSxJOLmVrRon8ts8x5ysJ76OKZi0tgtqiW 45cFf/QLe/mgxlfwqbzbFuCwEwvHxhyERk2iesjJG4a6Q== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id cf83f1c1 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:38 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:19 +0200 Message-Id: <20210531224427.13300-6-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/maven/pom.scm (fix-pom-dependencies): Also look at local packages when looking for a package version. --- guix/build/maven/pom.scm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index ffb4515179..9c0669c7cd 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm @@ -481,7 +481,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." (cons `(http://maven.apache.org/POM/4.0.0:version ,version) dep))) dep))) - (define* (find-version inputs group artifact #:optional optional?) + (define (find-packaged-version inputs group artifact) (let* ((directory (string-append "lib/m2/" (group->dir group) "/" artifact)) (java-inputs (filter @@ -493,13 +493,19 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." (versions (append-map ls java-inputs)) (versions (sort versions version>?))) (if (null? versions) - (if optional? #f - (begin - (format (current-error-port) "maven: ~a:~a is missing from inputs~%" - group artifact) - (throw 'no-such-input group artifact))) - (car versions)))) + (car versions)))) + + (define* (find-version inputs group artifact #:optional optional?) + (let ((packaged-version (find-packaged-version inputs group artifact)) + (local-version (assoc-ref (assoc-ref local-packages group) artifact))) + (or local-version packaged-version + (if optional? + #f + (begin + (format (current-error-port) "maven: ~a:~a is missing from inputs~%" + group artifact) + (throw 'no-such-input group artifact)))))) (let ((tmpfile (string-append pom-file ".tmp"))) (with-output-to-file pom-file -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 07/14] guix: maven: Use a temporary file to fix pom files. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250110315413 (code B ref 48766); Mon, 31 May 2021 22:45:05 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:03 +0000 Received: from localhost ([127.0.0.1]:35178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqec-00040L-V1 for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:03 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeJ-0003xU-2S for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:43 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 2d41001e for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=RwUbTj5DGl9suRIePKJhBQUm6 q/gfID+f6dg4+2Mdfk=; b=cnYwNGrHK2CqR4RZEw3qJNgdFIeHDj7Qsld50NuVD nCa67xmj8QOO3Q5lPOHCWzMS65wOiSaO7HVDnqWMqQN1pFcefIlX+8m2kNFfmqbx 3Jie49WpimWPr12elp9671a57ZLeBRs8tewRA5sYghyAMRCcwftG08t964An+eGv DTBqs4+AMFssBN6JLCXoik+psh0IaILpGuh20ozEDAH5Deea4C/UM9AlHaihP2bN 7s/5tXPfLOUP6cDs2Z9E3QIcbYi+0xAL9XYbKbVFjqIQoC4qAv8hYbDt9+u+O7C7 X1abx5aztAJftkaMFovr1/FOO+UntWhpkmjPuieC37MpA== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id bf12bcf2 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:38 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:20 +0200 Message-Id: <20210531224427.13300-7-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/maven/pom.scm (fix-pom-dependencies): Actually use the temporary file that was created. --- guix/build/maven/pom.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index 9c0669c7cd..9e35e47a7f 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm @@ -508,6 +508,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." (throw 'no-such-input group artifact)))))) (let ((tmpfile (string-append pom-file ".tmp"))) - (with-output-to-file pom-file + (with-output-to-file tmpfile (lambda _ - (sxml->xml (fix-maven-xml (fix-pom pom))))))) + (sxml->xml (fix-maven-xml (fix-pom pom))))) + (rename-file tmpfile pom-file))) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 08/14] guix: java-utils: Look for actual jar files. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250110315423 (code B ref 48766); Mon, 31 May 2021 22:45:05 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:03 +0000 Received: from localhost ([127.0.0.1]:35181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqed-00040W-Cy for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:03 -0400 Received: from lepiller.eu ([89.234.186.109]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeJ-0003xm-Gk for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:43 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 7afa04f8 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=Lmo/Ac18qo00A5ae6mt9nsm+b 6uIpNIUDX1KDG6piT4=; b=Td6Eo8PO+2RUVlxRs6U079UHR+ubCWV6jtp4Glrjr fgdYPhFKNBVjotdHSo4055pnmci26Jw3MDhmBkpMsfF9TF6UGz//Dj9/NpsPF8Do U+GQ6Rg2NMSjjapey52wxJf2zcySkNdrXJQVTcJ3sjBykcfPA7TdSZlmmkmJzvl0 WU1X9p2/+8S6ZdaEbbRTg3kuRYXvpAknOf65UJY2CaZ2egEOM0vEQs7sIQlhpbrZ wwnVtJZa9/JId+JhkA6jgNUPxq/ugDruZoSDIQmiD34rOeCGQU1guBgIaCdhQsrr ACXuXeHWhWl9sSEnuootjZ+s5i7Vwf1F1lXOcbmFfceTg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 3335224a (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:39 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:21 +0200 Message-Id: <20210531224427.13300-8-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * guix/build/java-utils.scm (install-from-pom): Fix `find-files` to look only for jar files. --- guix/build/java-utils.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm index 5a54a14c1b..87c3ac43c9 100644 --- a/guix/build/java-utils.scm +++ b/guix/build/java-utils.scm @@ -125,7 +125,7 @@ the phase fails." version ".jar")))) ;; Otherwise, we try to find any jar file. (jars (if (null? jars) - (find-files "." ".*.jar") + (find-files "." "\\.jar$") jars)) (jar-name (string-append repository artifact "-" version ".jar")) (pom-name (string-append repository artifact "-" version ".pom"))) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 10/14] gnu: java-commons-math3: Install to maven repository. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:45:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250110415432 (code B ref 48766); Mon, 31 May 2021 22:45:05 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:04 +0000 Received: from localhost ([127.0.0.1]:35184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqed-00040i-OA for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:04 -0400 Received: from lepiller.eu ([89.234.186.109]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeK-0003xm-4e for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:44 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 3c6b0278 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=szxZ04EHAkeAjLOP4QKxqlX/3 GXSAD+Ap37dYFxKk9s=; b=iZQh7+LIuwR2swm2Z+cfjLW9tFmqi3tNVQiOmD4un odvuuCxfF0Yu2ceRlFxf/Wsr6251hFjQreeX/htbr4Wefz2BaaZKE1ZuJgtlEv04 CJdhenjWDl2Oxdb4bj4ZkvwEnm0CJy2aNMfFyAAhYPbwM0Ggjt28eAqC38Dc8cRy mIYJzk5s+Z/sYudJ0qaFjiajvuQgVUtDTcDdUG90ZwLwBYSr0P0rcDtYFy5WyyNW iKHOH6t6MAoOG40prD+z/Zm0rdVZnzqX8qzhijdu/e5oWOwqqijDQDBkO/syUwrE /QGi2wKIJRnL7nJOq/PPSd0kVL2LElRGLsU3L3YV9dT2Q== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id c456afff (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:40 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:23 +0200 Message-Id: <20210531224427.13300-10-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * gnu/packages/java.scm (java-commons-math3)[phases]: Use install-from-pom. --- gnu/packages/java.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 14d02af512..dd9827a351 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5789,7 +5789,7 @@ overly clever.") #t)) ;; There is no install target. (replace 'install - (install-jars "target"))))) + (install-from-pom "pom.xml"))))) (native-inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core))) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 09/14] gnu: Add java-jopt-simple-4. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250111015494 (code B ref 48766); Mon, 31 May 2021 22:46:02 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:10 +0000 Received: from localhost ([127.0.0.1]:35186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqee-00040q-3O for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:10 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeJ-0003xU-PN for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:45 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id e1aeb2d1 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=WzIL0Gem2oIu wdRAOXtLIGAP+Q8lo+zzAFb26Ghkj14=; b=HfxVbAoprgoao0fFllEXY/XvMgD2 Swu5PrxZG/anQPO0lZTW3cSPllrbzd1dcjyU7Fo9b1KkxNz7mRg6kDPIKGU4S9J/ o/n9FEwhtkwmg3BDakCLj8Buj7u+2igo8S+X4Ahd1ixMndMZD4gSPxGdoS5mMG0l 0nFaquhzGqhr+a+OTGmEsKY0v9oycAVySFUfdC6t7gCoS3DCWs7VEmIUljIwvmqj W9nRVoerJBj/K2k0PtUw1WIHp0W6NvTsfWDOHkX+TV36/Y97vWopdavEO9Ewg98G 2LE3emS++HkrTmwiRbI/+FQ8mWHa8x1ZyuKufC2NWCRX/TwAxbs4v88PFQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id e189b1fd (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:39 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:22 +0200 Message-Id: <20210531224427.13300-9-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.7 (/) 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: -1.0 (-) * gnu/packges/java.scm (java-jopt-simple-4): New variable. (java-jopt-simple): Install to maven repository structure. --- gnu/packages/java.scm | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index d7118b4ce6..14d02af512 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen ;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro -;;; Copyright © 2017-2020 Julien Lepiller +;;; Copyright © 2017-2021 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018 Alex Vong ;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice @@ -5715,7 +5715,13 @@ The jMock library (build-system ant-build-system) (arguments `(#:tests? #f ; there are no tests - #:jar-name "jopt-simple.jar")) + #:jar-name "jopt-simple.jar" + #:phases + (modify-phases %standard-phases + (add-before 'install 'create-pom + (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version)) + (replace 'install + (install-from-pom "pom.xml"))))) (home-page "https://pholser.github.io/jopt-simple/") (synopsis "Java library for parsing command line options") (description "JOpt Simple is a Java library for parsing command line @@ -5727,6 +5733,28 @@ retrieval of options and their arguments simple and expressive, without being overly clever.") (license license:expat))) +;; Required by jmh +(define-public java-jopt-simple-4 + (package + (inherit java-jopt-simple) + (version "4.6") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "net/sf/jopt-simple/jopt-simple/" + version "/jopt-simple-" + version "-sources.jar")) + (sha256 + (base32 + "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd")))) + (arguments + (substitute-keyword-arguments (package-arguments java-jopt-simple) + ((#:phases phases) + `(modify-phases ,phases + (replace 'create-pom + (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" + ,version)))))))) + (define-public java-commons-math3 (package (name "java-commons-math3") -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 11/14] gnu: maven-core: Hardcode versions we have in Guix. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250111615510 (code B ref 48766); Mon, 31 May 2021 22:46:02 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:16 +0000 Received: from localhost ([127.0.0.1]:35193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeq-000422-9c for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:16 -0400 Received: from lepiller.eu ([89.234.186.109]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeK-0003xm-R2 for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:46 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 1718245e for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=poamOIHE5e8+ CfQpo9JuITwTdSvZpAKQLkWwk9CVDj8=; b=Fn+80HimZ+Qvy8jrKDdGVlsUL513 wa/Dmm5u53I+kAhsM7GIZMP+eXTomc3CPBBXApg0g+fGE5e3jwaD6lurx13QFYXr rWUJ2X/wOopqw50LeafqMumsrdLAkQ0wbPyDouq5s/FXisJ/7ZEfz80fHxcZCy9X pV0hMNUGwEhqefByR1gdq7XWmZJk2Es2+b/p2CPAg7C2KgjtQaQrl/1DRwg9kxn/ NulTKz3Gc+y+T/x531hcNufgt/3c8kRfrHU/M3MlUp4Ex+6x4oGhzHLGSQhxiF+Y oHKa8/FGm22vV3HuxFPTfnVhRP9TZuiBAGr+I2YiPWtby1nG8IZ8yEJfMQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id bd3c7f21 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:40 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:24 +0200 Message-Id: <20210531224427.13300-11-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * gnu/packages/maven.scm (maven-core)[phases]: Replace default hardcoded versions by versions of packages we have in Guix. --- gnu/packages/maven.scm | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index 8f63ee9be2..9d65e9b56d 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018 Julien Lepiller +;;; Copyright © 2018-2021 Julien Lepiller ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Björn Höfling ;;; Copyright © 2020 Efraim Flashner @@ -1541,7 +1541,9 @@ process.")))) (add-before 'build 'modify-metainf (lambda _ (substitute* "build.xml" - (("message=\"\"") "message=\"Implementation-Version: 3.5.4\n\"")) + (("message=\"\"") + (string-append "message=\"Implementation-Version: " + (package-version maven) "\n\""))) #t)) (add-before 'build 'add-maven-files (lambda _ @@ -1590,7 +1592,28 @@ artifactId=maven-core" ,(package-version maven-core-bootstrap)))) default-bindings-xml artifact-handlers-xml))))))) #t)) - (add-after 'generate-metadata 'rebuild + (add-after 'generate-metadata 'fix-plugin-versions + (lambda _ + ;; This file controls the default plugins used by Maven. Ensure + ;; we use the versions we have packaged by default + (substitute* '("build/classes/META-INF/plexus/default-bindings.xml" + "build/classes/META-INF/plexus/components.xml") + (("maven-install-plugin:[0-9.]+") + (string-append "maven-install-plugin:" + ,(package-version maven-install-plugin))) + (("maven-resources-plugin:[0-9.]+") + (string-append "maven-resources-plugin:" + ,(package-version maven-resources-plugin))) + (("maven-compiler-plugin:[0-9.]+") + (string-append "maven-compiler-plugin:" + ,(package-version maven-compiler-plugin))) + (("maven-surefire-plugin:[0-9.]+") + (string-append "maven-surefire-plugin:" + ,(package-version maven-surefire-plugin))) + (("maven-jar-plugin:[0-9.]+") + (string-append "maven-jar-plugin:" + ,(package-version maven-jar-plugin)))))) + (add-after 'fix-plugin-versions 'rebuild (lambda _ (invoke "ant" "jar") #t)))))) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 12/14] gnu: maven-enforcer-parent-pom: Fix pom. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250111715517 (code B ref 48766); Mon, 31 May 2021 22:46:03 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:17 +0000 Received: from localhost ([127.0.0.1]:35195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeq-000427-OU for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:17 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeM-0003xU-31 for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:46 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 9574ae23 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=UUqktu43TUIg3REhq0Gp2POYw IH2iwgGoS48eEOHAbY=; b=hzYEbRFpiJS8JIM8fhIXZy9WULkBmtqC5fzRGbwkm uCdqP0JuzJsknZf0sVUsdsVRNc+ecwQr5SDNSSmSKodsJxgxOQ7ZaBo4IoCuTEAg V5i/Gh2wdWMTqMpwGELKNvooJxPHST1GxFjKZevdmw3i3Drnd3I2sEyD9MAfX1Rj 1E1p11twK6dHl7E/zRCry4j855eMrUSbVAWxKnpShZxJA0QEhW5/u559Y8RkTEmf gr9h0D/7xCjFOvuzxmnPKxqHSoedXloXa3vZdHM+nB112aPwH3/OrKjOaEnEfwyO B3H//Uc7/o9jzBCl6Aru1uZJ3sD1qYvIS2qvf9bvPn8ow== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 1f80f5a9 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:41 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:25 +0200 Message-Id: <20210531224427.13300-12-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * gnu/packages/maven.scm (maven-enforcer-parent-pom): Fix dependency versions in pom file. --- gnu/packages/maven.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index 9d65e9b56d..f7cb168f47 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -2713,6 +2713,15 @@ Maven project dependencies.") (modify-phases %standard-phases (delete 'configure) (delete 'build) + (add-before 'install 'fix-pom-versions + (lambda _ + (substitute* "pom.xml" + (("3.8.1") ,(package-version java-commons-lang3)) + (("1.4.1") ,(package-version maven-resolver-util)) + (("1.12") ,(package-version java-commons-codec)) + (("2.2") + ,(string-append "" (package-version maven-dependency-tree) + ""))))) (replace 'install (install-pom-file "pom.xml"))))) (propagated-inputs -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 13/14] gnu: java-jmh: Update to 1.32. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250111715524 (code B ref 48766); Mon, 31 May 2021 22:46:03 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:17 +0000 Received: from localhost ([127.0.0.1]:35197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqer-00042E-4Y for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:17 -0400 Received: from lepiller.eu ([89.234.186.109]:38958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeM-0003xm-AW for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:47 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 1a425f0f for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=g2m4Ie5wbSMq0n/J51XqTmlM9 M+xk7nIochU1B7ZaXk=; b=ZpT5Jbd875VVTuwxc/287MXY9GFkAM0FeZ16qR9gJ T0WdvklWTk0qIcoejuPv24+/4FwGukkFvEek126cQze/Smy7dMFv269SnNKcYFZj aIwI7R18m0MytcujX1HpvRSebXeltDHb3crEVGpXEguQfFgOmd8uIKUS91QJOaj1 VNB6JvgOT4fTKZVD2W8QoBUrDLKfcWUPhR64pzS+uRxYb7bahGbCEyArWhjCcIjP b3H5OY3aOnPAZRpQCj35Et9YzFZT0kQdubqFOP3KMhJVxTniftk0GTRC7MIZUcZP 6eT9CoYU7mEBrg0vNrSjiA+1f1fbaxh1Bvgc5BTx+qcFw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 0d78ffdb (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:41 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:26 +0200 Message-Id: <20210531224427.13300-13-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * gnu/packages/java.scm (java-jmh): Update to 1.32. [source]: Switch to the git repository. --- gnu/packages/java.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index dd9827a351..c7ae002736 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5803,16 +5803,16 @@ available in the Java programming language or Commons Lang.") (define-public java-jmh (package (name "java-jmh") - (version "1.17.5") + (version "1.32") (source (origin - (method hg-fetch) - (uri (hg-reference - (url "http://hg.openjdk.java.net/code-tools/jmh/") - (changeset version))) - (file-name (string-append name "-" version "-checkout")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/openjdk/jmh") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) + "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0")))) (build-system ant-build-system) (arguments `(#:jar-name "jmh-core.jar" -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48766] [PATCH 14/14] gnu: java-jmh: Switch to maven-build-system. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 22:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48766@debbugs.gnu.org Received: via spool by 48766-submit@debbugs.gnu.org id=B48766.162250111715531 (code B ref 48766); Mon, 31 May 2021 22:46:03 +0000 Received: (at 48766) by debbugs.gnu.org; 31 May 2021 22:45:17 +0000 Received: from localhost ([127.0.0.1]:35199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqer-00042L-Dc for submit@debbugs.gnu.org; Mon, 31 May 2021 18:45:17 -0400 Received: from lepiller.eu ([89.234.186.109]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqeM-0003xU-UU for 48766@debbugs.gnu.org; Mon, 31 May 2021 18:44:47 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id b9b755f2 for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=U3u5y/mW3Er6It0aR3zq9awiE eRnpgE/0mC3oTP6MJw=; b=jnmXcQGO9f/iO3fBylBHUPfTD3Aj3amgqL4pjnQDL 6KGxWxZCcbOGSAGnLMwnwtRlWm+t6nsmwVkDPXcel3ou2+EZQWLUZOCxeb23T1i2 n8RDnVyHKBwEyz9tTjVlmlZ0lrHelvJ613Fl6n4VqgCrUPuYX3ba+ee2uLvO2t0t tOzJ1bS81HfwyIPSbV3RcoGkMXMCmfUd5fVzHFuWxK9IZvy8qq3olklU9SxljT5F bk9A/agWDaNVxD43Np9SXXUCNMhTjk9onHL6t1yOt5CoIsDpa/bZqv0VqQZf64YH iC27ClOdlNF3WyhPJD+LAhs7Ipdwp4LtqvuHcFdNThf4w== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 27ba40a7 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766@debbugs.gnu.org>; Mon, 31 May 2021 22:44:42 +0000 (UTC) From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:27 +0200 Message-Id: <20210531224427.13300-14-julien@lepiller.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531224427.13300-1-julien@lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> <20210531224427.13300-1-julien@lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) * gnu/packages/java.scm (java-jmh): Switch to maven-build-system. --- gnu/packages/java.scm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c7ae002736..f597c64811 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -43,6 +43,7 @@ #:use-module (guix utils) #:use-module (guix build-system ant) #:use-module (guix build-system gnu) + #:use-module (guix build-system maven) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages attr) @@ -5813,26 +5814,27 @@ available in the Java programming language or Commons Lang.") (sha256 (base32 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0")))) - (build-system ant-build-system) + (build-system maven-build-system) (arguments - `(#:jar-name "jmh-core.jar" - #:source-dir "jmh-core/src/main" - #:test-dir "jmh-core/src/test" + `(#:exclude + (("org.apache.maven.plugins" . + ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin" + "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin")) + ("com.mycila.maven-license-plugin" . ("maven-license-plugin")) + ("org.apache.maven.wagon" . ("wagon-ssh"))) + #:maven-plugins + (("maven-enforcer-plugin" ,maven-enforcer-plugin) + ,@(default-maven-plugins)) #:phases (modify-phases %standard-phases - ;; This seems to be a bug in the JDK. It may not be necessary in - ;; future versions of the JDK. - (add-after 'unpack 'fix-bug + (add-after 'unpack 'remove-unnecessary (lambda _ - (with-directory-excursion - "jmh-core/src/main/java/org/openjdk/jmh/runner/options" - (substitute* '("IntegerValueConverter.java" - "ThreadsValueConverter.java") - (("public Class valueType") - "public Class valueType"))) - #t))))) - (inputs - `(("java-jopt-simple" ,java-jopt-simple) + ;; requires org.apache.maven.archetype:archetype-packaging. + ;; Its subprojects also require groovy, kotlin and scala, + ;; respectively. + (delete-file-recursively "jmh-archetypes")))))) + (propagated-inputs + `(("java-jopt-simple" ,java-jopt-simple-4) ("java-commons-math3" ,java-commons-math3))) (native-inputs `(("java-junit" ,java-junit) -- 2.31.1 From unknown Tue Jun 17 22:27:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Julien Lepiller Subject: bug#48766: closed (Re: [bug#48766] [PATCH] gnu: java-jmh: Switch to maven-build-system.) Message-ID: References: <20210622131331.3936334a@tachikoma.lepiller.eu> <20210601004100.69baa2d0@tachikoma.lepiller.eu> X-Gnu-PR-Message: they-closed 48766 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 48766@debbugs.gnu.org Date: Tue, 22 Jun 2021 11:14:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1624360442-10312-1" This is a multi-part message in MIME format... ------------=_1624360442-10312-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #48766: [PATCH] gnu: java-jmh: Switch to maven-build-system. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 48766@debbugs.gnu.org. --=20 48766: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48766 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1624360442-10312-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 48766-done) by debbugs.gnu.org; 22 Jun 2021 11:13:39 +0000 Received: from localhost ([127.0.0.1]:37968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lveLb-0002fc-K1 for submit@debbugs.gnu.org; Tue, 22 Jun 2021 07:13:39 -0400 Received: from lepiller.eu ([89.234.186.109]:45466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lveLZ-0002fT-8A for 48766-done@debbugs.gnu.org; Tue, 22 Jun 2021 07:13:38 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 7ce5fa1d for <48766-done@debbugs.gnu.org>; Tue, 22 Jun 2021 11:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=ofrLcjPq6wDu EiPms2Tvt0lqpw7+7BKVeyoy8NJ83dE=; b=mbI1EMtcFks/eZBc+zmCvUw2Z4qI uOyfzj5Za+oIg/Gay80CqIDaLJkmYN85MxRcpqQq0MRNSmaQ5JzJ4tXXuReg5fGn JxKQzeJ/QDrf1R9u2RRvb2lRwCPle+83dA9zoZgxnMgFlPfQ1wXF0ljD+9JqkRhr Q+lsPAxaKiD2flyPcOs7+qHdtue44NErsNYYAKxhc72x/Z2FFmchi2dZntkUEmUe QaIj6j5sFXOI8F9jlFhW7hKHr5tqzpxle2tGpK6AoBLQI5omE4adBXyAjjA9m8yL GTwvZVS/vmxPV3wdIMToEutTTp4R6YbLjRIXCDd22NhYbe5qcaALvuOTCw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id b7abcade (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <48766-done@debbugs.gnu.org>; Tue, 22 Jun 2021 11:13:34 +0000 (UTC) Date: Tue, 22 Jun 2021 13:13:31 +0200 From: Julien Lepiller To: 48766-done@debbugs.gnu.org Subject: Re: [bug#48766] [PATCH] gnu: java-jmh: Switch to maven-build-system. Message-ID: <20210622131331.3936334a@tachikoma.lepiller.eu> In-Reply-To: <20210601004100.69baa2d0@tachikoma.lepiller.eu> References: <20210601004100.69baa2d0@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48766-done 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: -1.0 (-) After almost a month of silence, pushed to master as 4c98db94b0271aa5371ff00cf98c0ebc70ab1a8d to 1b1eeb3b123162c4d73c939e9ca7bbbb4f79aef1. Thanks! ------------=_1624360442-10312-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 31 May 2021 22:41:22 +0000 Received: from localhost ([127.0.0.1]:35146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqb4-0003sd-0j for submit@debbugs.gnu.org; Mon, 31 May 2021 18:41:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:37600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnqb2-0003sU-AJ for submit@debbugs.gnu.org; Mon, 31 May 2021 18:41:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnqb1-0005rN-PO for guix-patches@gnu.org; Mon, 31 May 2021 18:41:20 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:56370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnqaz-00050W-SO for guix-patches@gnu.org; Mon, 31 May 2021 18:41:19 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 1458c6ed for ; Mon, 31 May 2021 22:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=dkim; bh=aOVyJAQuIH3mNyloyBThUG1Xy 3g14+7s45oMmC1cbOg=; b=jioSG850vO1DFs3SKXCyhqBGT07EwfMZsEW0sTAmB p0YInJUikc+MpOn1COUBOKSlsiFHNmxEqIl4wgFZ2zi1K3EXK5bfgCZHi2ZCEuSw 2PJWZNNl3yqOv7HGBxNzTcBxfvOKKHvma4YnbG5BTUp7t9iPjpMdLWMAuL8b1idv cmKjSdAhwdQIVb4AhsbkOranx5f3Bw8NLR4pEIkb6FfDnLuls6DJ+eD/20us8Vp1 uYb18OqjxfHcElT1Fh+ffkIkn6KEnP/L5xN9X6EGF83mSr4BcHWjpp/VHx2Pccz5 nv2dNsuCSdxp3IHK6a9c43GgayqmqpLjG3ghMMPpRkpNQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id f3262e78 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Mon, 31 May 2021 22:41:08 +0000 (UTC) Date: Tue, 1 Jun 2021 00:41:00 +0200 From: Julien Lepiller To: guix-patches@gnu.org Subject: [PATCH] gnu: java-jmh: Switch to maven-build-system. Message-ID: <20210601004100.69baa2d0@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) Hi Guix! I'm excited to submit this patch series, as it adds the first package to guix that uses the maven-build-system. The series first improves the maven build system, so it actually works with jmh :) The series then changes a few dependencies to install to the maven repository structure (lib/m2), so they can be detected by maven during the build. Since the series updates files that are used by the ant-build-system, it unfortunately needs to update all java packages. Grepping for "build-system ant-build-system", it shows 302 packages, which is two packages above the limit for master. However, since most java packages are fast to build, I'd like to ask for an exception to this rule and push to master directly. Patches will follow :) ------------=_1624360442-10312-1--