unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: Julien Lepiller <julien@lepiller.eu>, guix-devel <guix-devel@gnu.org>
Subject: Re: maven build system - new insights
Date: Thu, 31 Jan 2019 23:48:44 +0100	[thread overview]
Message-ID: <a1eb08bc-55dc-f258-5439-af187ca9c84b@crazy-compilers.com> (raw)
In-Reply-To: <71F627FD-4E2E-4E8D-B73E-433368CE3B6B@lepiller.eu>

Hi,

Am 31.01.19 um 18:06 schrieb Julien Lepiller:

Here are my 2cent:

> We found that we need more plugins to be able to build maven projects, and that requires some metadata in the jar file. This metadata is generated by maven-plugin-tools-generators, and maybe we can write a thin java wrapper around it, or use sxml to generate the file.

Regarding the thin java layer it might be interesting to have a look at
Debians build helpers which might contains some of what we need.
Unfortunately it is not well documented (at least i did not find it
quickly), but asking the Debian Java packagers might be helpful.


> If we are going to use mvn and not xmvn, we could change the ant-build-system to generate the repository structure you describe

There seems to be a maven task for doing so: install:install-file [1].


> and have a phase to build a union of these with symlinks. Hopefully, maven will follow the symlinks.

The drawback of this approach is: This only works within the
build-system. Since within a normal environment or profile, there will
be no such unison repo. Thus for every day's work, users will still
download artifacts from the Internet and will not be able to use those
already installed on the system.

One of the points I like at Xmvn is that is does not try to reach out to
the internet. And users should be able to simply replace mvn by xmvn to
ensure only "well known" packages are used.


> It seems we don't need more info in the jar files themselves, but we need to install the pom.xml file alongside the jar itself. Additionnaly, we need "parent poms" because they contain properties and values used by our packages and maven will want to read those.

For the jar an pom-files, install:install-file could help [1]. For the
parent poms I have no idea, beside the Debians build helpers having some
"DebianDependencies" class.


> Xmvn looks very cool, but that's still 32 more packages to build properly and generate metadata for, so it's not clear if that's an advantage when we already have a maven package? I'm also a bit worried that it miqht not work properly, as it's an equivalent of 3.0.0, but we have a newer version of maven.

Oh, I missed one relevant point: these 32 packages are also dependencies
of maven. Thus they are already available. :-) It just that we most
probable could throw out 16 packages from the manual bootstrap. (There
are 3 additional xmvn packages, though.)

The version 3.0.0 is the Xmvn version which seems to be unrelated to maven.

Prior to going down the Xmvn-road we should collect a list of questions
to ask the developers. E.g. [2] say: "Some parts of XMvn require
Gradle". If we need these parts for bootstrapping this would be a
show-stopper.

> We will also need to override dependency and plugin versions for maven to find guix' versions, so we'll need a parser and generator for pom.xml files.

Maybe some xml-search-replace would suffice? E.g. implemented using
SXPATH [3]


[1] https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
[2] https://github.com/fedora-java/xmvn/blob/master/README.md
[3] https://www.gnu.org/software/guile/manual/html_node/SXPath.html

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

  reply	other threads:[~2019-01-31 22:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31 10:00 maven build system - new insights Hartmut Goebel
2019-01-31 17:06 ` Julien Lepiller
2019-01-31 22:48   ` Hartmut Goebel [this message]
2019-01-31 23:33     ` Ricardo Wurmus
2019-02-05 12:00       ` Hartmut Goebel
2019-01-31 23:30 ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1eb08bc-55dc-f258-5439-af187ca9c84b@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=guix-devel@gnu.org \
    --cc=julien@lepiller.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).