>What do you think about this alternative idea?

It looks pretty straightforward at a first glance, but I think it would
require
other components because you are not providing any information of
the direct dependencies of the java packages/artifacts, which
means it might have to consult other sources (probably a remote repo)
first, and then attempts to resolve to a local JAR from your
WorkspaceReader.

Have you tested this with --offline and the local maven cache (~/.m2)
cleared beforehand to see if your extension can actually work in a
sandboxed environment? XMvn does make use of this but it does
more than just this, it generates full POMs which might be very hard
to tackle.

Another thing is for gradle. It does not expose public API for custom
repositories. It does have the API for it, but it is not documented and
it is subject to change. XMvn has a gradle connector, but it is already
outdated and would only work for older gradle versions. I have tried
to create a gradle plugin with a custom repository, but the internal API
was very confusing, and it wasn't clear what I should do.

It seems that having a local maven repository is the only straightforward
and easy solution which doesn't involve much heavy patching of build
files or deep understanding of the infrastructure with a large amount of
effort in order to maintain the project.

Kaibo Ma

Reply via email to