help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guidance for packaging Java programs


From: Julien Lepiller
Subject: Re: Guidance for packaging Java programs
Date: Fri, 28 Jul 2023 07:07:56 +0200
User-agent: K-9 Mail for Android


Le 28 juillet 2023 04:09:42 GMT+02:00, Bruno Victal <mirai@makinata.eu> a écrit 
:
>Hi Julien,
>
>On 2023-07-13 18:48, Julien Lepiller wrote:
>> If you feel like helping, maybe an importer would be a good first step :). 
>> You should be able to get info from Maven Central (get the pom files, they 
>> are XML files and we have a module somewhere to handle them (guix build 
>> maven pom) I think). It should work for maven and gradle packages at least. 
>> Mapping maven name to guix names might also be challenging, but we can solve 
>> with an upstream-name property.
>> 
>> Here are some more resources if you want to learn more about Guix and Java:
>> 
>> I gave a talk about bootstrapping Maven in 2020:
>> 
>> https://xana.lepiller.eu/guix-days-2020/guix-days-2020-julien-lepiller-bootstrapping-maven-480.mp4
>
>Thanks! This was very helpful in providing an overview of the system.
>
>Can we say that the maven in Guix has already been “bootstrapped” or is there 
>something still missing?
>Given the large and non-trivial nature of just the “bootstrap” part, would it 
>make sense to split
>gnu/packages/maven.scm into maven-bootstrap.scm and maven-<anything else>.scm 
>files to keep things manageable?

Maven itself is bootstrapped, along with the essential plugins. We're still 
missing many plugins. As long as we don't have maven-plugin-plugin, we need to 
build them "manually" in the same way we build other other plugins. It could be 
an interesting target for improving the situation.

>
>The maven-importer situation is quite unfortunate due to the often absent 
>source location, a quick glance
>here suggests that the best we might hope for is an automation-½ approach: 
>generate “skeleton” package
>definitions and manually fill-in the source & co.
>
>Some additional maven related questions:
>
>* What is 'sisu.sh' & 'components.sh' and when/what are they used for?

They are scripts to automatically generate some files that are required at 
runtime for "dependency injection". Normally, this generation is done by a 
maven plugin, but in the bootstrap, we can't use maven, so we managed to 
replace that with a small script.

>
>* Is it common for maven plugins to end up with package definitions
>that make heavy use of inherit? (a quick glance at gnu/packages/maven.scm
>gives the impression that it all looks very fragile due to the matryoshka-like
>inheritance rabbit-holes)

There's inheritance everywhere in java and maven packages. There shouldn't be 
that many layers though. Usually, there's a package definition and its 
bootstrap version or other components from the same source inherit from it.

If you find a way to simplify all that, it's more than welcome :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]