Java Woes

For personal projects, as well as some other basic automation tasks, I use Jenkins to host pipelines. It's very extensible, and I really like the old-school UI. Takes me back to the times of Minecraft server plugins and such.

One of the plugins (written in Java) I used appeared to have broken - it interacted with a public API which annoyingly broke their contract without publishing a new version. It looked like a simple change to fix, so I went out and pulled the code to see if I could do it myself and create a PR. I found that somebody had already had a fix, but had been sitting unapproved in a PR since the start of the year. Uh-oh, abandonware.

It was a pretty simple plugin, really, so I figured I would just re-create it myself. I use OpenAPI quite a bit at work in C#, so I figured I would use that to generate the client, rather then manually interact with the public API like the other plugin did. All I need to do is create a new project, add a generate hook with the API's OpenAPI doc, and publish it. I do it all them time.

Oh how naïve I was. Java is quite complicated, I struggled just to get a simple project up and running. I also had no idea why clicking the green hammer wasn't producing any output, apparently I had to set up Maven? And how the hell are dependencies supposed to work, do I really have to add the transitive dependencies myself?

I spent a good couple of hours trying to get everything together, only to find out that the OpenAPI doc provided by that public API wasn't well-constructed, and would need extensive modification to get it to produce a Java project that would build without error. Real agile.

You never know how well you have it until you try something new. Java is so much more complicated than I had previously thought, and there are so many ways to do simple things like dependency and build management. The .NET ecosystem certainly has problems of its own, but its so much simpler and quicker to get up and running. Modern .NET has considered the development experience from the ground up, and it really shows.


You'll only receive email when they publish something new.

More from abcedea
All posts