Last Update: 23.08.2018. By Jens in Newsletter
Yeah, this morning I did have some fun with another legacy app. Like the one from the stone age, it is closing 10 years soon. And the guy, solely working on it, wasn’t a proficient dev so to say. He did get the stuff done but lacked a lot and had no real interest in progression. But he was nice :-)
Anyways, it wasn’t the code base this morning that gave me headaches. It was the release of one of the services of it. The codebase hasn’t been touched for half a year now until my recent changes. So, there had been no release at all. However, in the meantime, the Admin changed a bit like they do always, often not communicating.
They moved the internal Maven repo and updated to Java 8. Sure, the Java update was discussed with the former devs but interestingly no release was performed after that. So, I had the pleasure of doing that. Turned out it did not work.
The first thing was a strange error in the tests but only in the release perform cycle. The tests run fine during the release prepare and on the regular builds. As it were too many, I could disable them, yeah default dev logic :-). Turns out the syntax is a bit different for the Maven release plugins.
Next thing was, the Maven Javadoc plugin now checks your Javadoc in strict mode during the build if you are on Java 8. So, there were hundreds of Errors because of that. Good that you can turn that off too.
This call will disable test and javdoc:
mvn -Dmaven.javadoc.skip=true -DskipTests -Darguments=”-DskipTests -Dmaven.javadoc.skip=true” release:clean release:prepare release:perform
Not the best, but it worked in that case and the changes were small and local anyways.
The next hurdle was the moved Maven repo and wrong SCM destinations in the pom. It’s the section pointing to the source code in your version control system. Somehow it pointed wrong but did so for over a year now. Which made me wonder how the former guy could do a proper release or what else he did and his arcane knowledge is now gone.
Anyhow, that was a morning banging my head on the table… But it is out now, let’s hope everything is fine on PreProd. Nonetheless, what I learned again is to include buffer teven for that stuff. As the regular builds worked, I thought it is just hitting 2 buttons changing a version number to get the release out. Damn, was I wrong!
So, don’t be like me, add buffer, it’s better for your mental health.
Anyways, could finish the tutorial too, so check the Feign client out.