Language Selection

English French German Italian Portuguese Spanish

diet4j: run Maven modules directly, and avoid gigantic JARs and WARs

Maven is great for breaking gigantic code bases into many little modules, with identified dependencies. This allows incremental builds etc.

And then, to run that code, we usually put all together again into a uber-mega-JAR or WAR, or with mile-long class paths. While sometimes this makes sense, often it does not.

diet4j can run command-line apps, and Tomcat web apps, similarly to how maven builds projects: simply specify the name of the top project, and diet4j assembles all the other JARs automatically for the run.

E.g. if your project hierarchy looks like this:

    Project A
        Project B
            Project C
        Project D

you can say:

> diet4j A

which will read the POM in A.jar (in ~/.m2/repository, or a location of your choosing), determine run-time dependencies, then recursively look for B.jar, C.jar and D.jar, load them into separate ClassLoaders, hook up dependencies and jump on the main program (if it has one) of Project A.

It may not be for all people, but it is for some who want to distribute changes incrementally, avoid rebuilding gigantic JARs every time some small change needs to happen, fit better into Linux-style package management etc. It’s also great for dynamically finding and loading modules without restarting the application.

We’d love some feedback, it’s early days.

http://diet4j.org/

More in Tux Machines

Going Against Google Analytics With Plausible’s Co-Founder [Interview]

Plausible is a privacy-friendly alternative to Google Analytics. It also aims to be a simple and lightweight analytics solution. Above all, it is a completely open-source project that also gives you the ability to self-host. Right after an interview with Lutris creator, I reached to out to Marko Saric, who happens to be a Co-Founder of the project to provide some insights on his vision for this project and the future of Plausible. Read more

Android Leftovers

Latest Arch Linux ISO Release Comes with the ArchInstall CLI Guided Installer

Arch Linux 2021.04.01 is now available for download as the most up-to-date installation medium of this independently developed, flexible, lightweight, and rolling-release GNU/Linux distribution. While last month’s ISO release was the first to be powered by the latest and greatest Linux 5.11 kernel, Arch Linux’s ISO release for April 2021 includes the archinstall guided installer developed by Anton Hvornum. Read more

Linux As An Alternative To Windows & MacOS

I downloaded Mandrake Linux and installed it onto my computer and tried it. It had a familiar-looking desktop, not exactly like windows but not too alien from it either. It contained some useful software including a web browser, email program, office suite, etc, and I loved trying something truly different. The problem I found though, it was too difficult to download new programs and to customise the user experience. It had a command-line interface meaning you needed to type computer code to download programs or change the system to your liking. Although it looked familiar, to use it on a day-to-day basis, a certain amount of coding knowledge was required. I wanted to use my computer to be productive rather than learning to code to use it. Although this experiment was enjoyable, at this stage Linux just wasn’t for me. Read more