GNU bug report logs - #42100
[PATCH] Add maven-build-system.

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Sun, 28 Jun 2020 01:42:02 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42100 in the body.
You can then email your comments to 42100 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42100; Package guix-patches. (Sun, 28 Jun 2020 01:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Lepiller <julien <at> lepiller.eu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 28 Jun 2020 01:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: guix-patches <at> gnu.org
Subject: [PATCH] Add maven-build-system.
Date: Sun, 28 Jun 2020 03:41:35 +0200
[Message part 1 (text/plain, 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!
[test.scm (text/x-scheme, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#42100; Package guix-patches. (Mon, 06 Jul 2020 19:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 42100 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 42100 <at> debbugs.gnu.org
Subject: Re: [bug#42100] [PATCH] Add maven-build-system.
Date: Mon, 6 Jul 2020 21:09:27 +0200
Friendly ping :)

If anyone wants to review, but needs more time, please say so.
Otherwise, I'll push next week!

Le Sun, 28 Jun 2020 03:41:35 +0200,
Julien Lepiller <julien <at> lepiller.eu> a écrit :

> 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!





Information forwarded to guix-patches <at> gnu.org:
bug#42100; Package guix-patches. (Fri, 17 Jul 2020 02:25:02 GMT) Full text and rfc822 format available.

Message #11 received at 42100 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 42100 <at> debbugs.gnu.org
Subject: Re: [bug#42100] [PATCH] Add maven-build-system.
Date: Fri, 17 Jul 2020 04:24:17 +0200
Le Mon, 6 Jul 2020 21:09:27 +0200,
Julien Lepiller <julien <at> lepiller.eu> a écrit :

> Friendly ping :)
> 
> If anyone wants to review, but needs more time, please say so.
> Otherwise, I'll push next week!
> 
> Le Sun, 28 Jun 2020 03:41:35 +0200,
> Julien Lepiller <julien <at> lepiller.eu> a écrit :
> 

Since there was no answer, I went ahead and pushed. Since there are
only ~250 packages that use the ant-build-system, I pushed to master. I
hope my calculations are right. Pushed as
3d3bc413b4288fbf45a61fb2136387878375ebef to
55b90c90532cd50617fb3dd56173f96de1cbe0b3 (111 commits).




Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Fri, 17 Jul 2020 02:26:01 GMT) Full text and rfc822 format available.

Notification sent to Julien Lepiller <julien <at> lepiller.eu>:
bug acknowledged by developer. (Fri, 17 Jul 2020 02:26:01 GMT) Full text and rfc822 format available.

Message #16 received at 42100-done <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 42100-done <at> debbugs.gnu.org
Subject: Re: [bug#42100] [PATCH] Add maven-build-system.
Date: Fri, 17 Jul 2020 04:25:19 +0200
And closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 14 Aug 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 255 days ago.

Previous Next


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