From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eEnCJnT1916HWAAA0tVLHw (envelope-from ) for ; Sun, 28 Jun 2020 01:42:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4A1yInT1915nXgAAbx9fmQ (envelope-from ) for ; Sun, 28 Jun 2020 01:42:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E48709404C7 for ; Sun, 28 Jun 2020 01:42:11 +0000 (UTC) Received: from localhost ([::1]:52008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpMKf-0006vk-A5 for larch@yhetil.org; Sat, 27 Jun 2020 21:42:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpMKY-0006vO-Hk for guix-patches@gnu.org; Sat, 27 Jun 2020 21:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33331) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpMKY-0002Ky-7r for guix-patches@gnu.org; Sat, 27 Jun 2020 21:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jpMKY-0006GJ-6Y for guix-patches@gnu.org; Sat, 27 Jun 2020 21:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42100] [PATCH] Add maven-build-system. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Jun 2020 01:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42100 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42100@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159330851724058 (code B ref -1); Sun, 28 Jun 2020 01:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jun 2020 01:41:57 +0000 Received: from localhost ([127.0.0.1]:44877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpMKT-0006Fx-HD for submit@debbugs.gnu.org; Sat, 27 Jun 2020 21:41:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:50682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpMKR-0006Fq-Jd for submit@debbugs.gnu.org; Sat, 27 Jun 2020 21:41:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpMKR-0006uZ-Bo for guix-patches@gnu.org; Sat, 27 Jun 2020 21:41:55 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:39964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpMKO-0002Ja-M0 for guix-patches@gnu.org; Sat, 27 Jun 2020 21:41:55 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 1b9f8ea9 for ; Sun, 28 Jun 2020 01:41:45 +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; s=dkim; bh=mWL lWzneOaI+/dXrjlDkHgX3HHnw+GqfebWtlZ+zEsc=; b=T0R5B6yu3gbUan9dYhX kuRQYyJsP33IenvfVYmIa8RmQKn6jXWowuodQgiFBQn6BC7XytLKMKYZnqiCxtFp K0cBbdxEuwxwij8CppP4zpyrM+QbWCDZ0tAfsXD7mcpDU7q3uAzKBVYP8gMasWpu mP+SGrDMYlLPytF5FFV2ad9FI3UoN0CpnLbMDMFHMG0aQdVEts6jpIs4MjKWeoAX kCbMn8LuI5AWB6UlwlZ7Lddj0ZPjrl5E5hqF+/QsSe87bB5e/m7w8ZtcTne/GdZO SqSAWLrgIh4eAgonpHI/f9BvlSla+Sv4K95Ga1Ct/S0hUnhAEU6Nioz/1BLae9xe g0g== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 85e50007 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sun, 28 Jun 2020 01:41:45 +0000 (UTC) Date: Sun, 28 Jun 2020 03:41:35 +0200 From: Julien Lepiller Message-ID: <20200628034135.2c7b9d9b@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/x.FUuJ6jztuQojqTpR0RL/d" Received-SPF: none client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=lepiller.eu header.s=dkim header.b=T0R5B6yu; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: wFtVfZS8a7iM --MP_/x.FUuJ6jztuQojqTpR0RL/d Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guix! This patch series adds the maven-build-system, at last! You can find the patches on the wip-maven-build-system branch of my repository, at https://framagit.org/tyreunom/guix/-/tree/wip-maven-build-system I haven't sent the patches on this mailing because there are ~100 of them. If you prefer, I'll send the series with git send-patch. Here is a summary of the changes: guix: java-utils: Add Maven-related phases. This patch adds some functionalities to guix/build/java-utils.scm, in particular the install-from-pom and install-pom-file functions that are phases you can use instead of the install phase. As their name suggests, they install a package from a pom.xml file to a maven repository directory structure in lib/m2. install-pom-file only installs a single pom.xml file, instead of the file and its jar. gnu: java-asm: Remove dependency on bnd libraries. ... gnu: java-jarjar: unbundle maven-plugin-api. This small series of patches improves the bootstrap of java-junit by not relying on bundled libraries (binaries), by enabling tests in junit and by reducing the number of dependencies that must be built before junit. Junit is now fully bootstrapped. gnu: java-junit: Install from pom file. This patch converts junit and its dependencies to the maven repository structure. It also takes care of changing junit's dependents that had a hardcoded path to the junit jar file. gnu: Add apache-parent-pom-13. ... gnu: Add maven-components-parent-pom-21. This series adds many parent pom packages to a new file, maven-parent-pom.scm. A parent pom is a single pom.xml file that contains information about a project. Actual packages can then reference these files to inherit some or all of these information. gnu: java-commons-lang3: Update to 3.9. ... gnu: maven: Install from pom file. These patches update some dependencies of maven and the maven build system, and convert them so they are installed in the maven repository structure. gnu: maven-shared-utils: Fix /bin/sh invocation. gnu: java-modello-core: Propagate inputs. These two patches implement fixes that are required later on. gnu: Add java-plexus-digest. ... gnu: Add maven-jar-plugin. This patch series adds more packages that are maven plugins or their dependencies. Maven doesn't do anything by itself, it's simply a dependency/lifecycle manager. It requires plugins to actually do things such as compiling, creating a jar archive, installing, testing, etc... This is what these patches implement. guix: Add maven-build-system. The actual commit that adds the maven-build-system :) In the end, the maven-build-system only has the very basic plugins by default, but it is able to compile, test and install a simple hello world example application, generated by maven (see test.scm attached). Next step is building the maven-plugin-plugin, which is the plugin that builds other plugins. Currently the plugins are built with a custom plugin.xml generator that uses a buggy java parser, so I don't want to rely on it for other plugins. Note that we can't use the maven-plugin-plugin to build any of the current plugins, since they are needed to build themselves... I also noticed that our maven is acting weird wrt lifecycles: it seems to be doing some test-related work during the build step, and rebuilds in the test and install steps. This is weird, but I'm not sure how to fix. Re-building maven with the maven-build-system might give as a better version of maven. I don't really want to investigate that now, that's why I'm sending the patch series anyway. Hope you enjoy! --MP_/x.FUuJ6jztuQojqTpR0RL/d Content-Type: text/x-scheme Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=test.scm (use-modules (guix build-system maven) (guix packages) ((guix licenses) #:prefix license:) (guix git-download)) (let ((commit "775960a985785913fb85428979d253c0b0e1d774") (version "1.0-SNAPSHOT") (revision "0")) (package (name "maven-test") (version (git-version version revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://framagit.org/tyreunom/maven-example-project") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "056p1kc4dpdp8rzxrbp9y0z278hjzpqkrjq63wgcyi0ns5jbc5nv")))) (build-system maven-build-system) (home-page "") (synopsis "") (description "") ;; Note: this package is generated automatically by maven, which is under asl2.0 (license license:asl2.0))) --MP_/x.FUuJ6jztuQojqTpR0RL/d--