Gentoo Archives: gentoo-dev

From: Kaibo Ma <kaiboma06@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RfC] Supporting Maven/Gradle build systems by installing to a local maven repository
Date: Tue, 23 Mar 2021 05:02:26
Message-Id: CANt-4EiN8KZG-DAJzou8QP4uVx2bEg=z2oTkWeOpywGYvbA1Zw@mail.gmail.com
In Reply to: Re: [gentoo-dev] [RfC] Supporting Maven/Gradle build systems by installing to a local maven repository by Henning Sudbrock
1 >What do you think about this alternative idea?
2
3 It looks pretty straightforward at a first glance, but I think it would
4 require
5 other components because you are not providing any information of
6 the direct dependencies of the java packages/artifacts, which
7 means it might have to consult other sources (probably a remote repo)
8 first, and then attempts to resolve to a local JAR from your
9 WorkspaceReader.
10
11 Have you tested this with --offline and the local maven cache (~/.m2)
12 cleared beforehand to see if your extension can actually work in a
13 sandboxed environment? XMvn does make use of this but it does
14 more than just this, it generates full POMs which might be very hard
15 to tackle.
16
17 Another thing is for gradle. It does not expose public API for custom
18 repositories. It does have the API for it, but it is not documented and
19 it is subject to change. XMvn has a gradle connector, but it is already
20 outdated and would only work for older gradle versions. I have tried
21 to create a gradle plugin with a custom repository, but the internal API
22 was very confusing, and it wasn't clear what I should do.
23
24 It seems that having a local maven repository is the only straightforward
25 and easy solution which doesn't involve much heavy patching of build
26 files or deep understanding of the infrastructure with a large amount of
27 effort in order to maintain the project.
28
29 Kaibo Ma

Replies