Very frequently a large old project has been implemented using technology that is itself outdated. For example, don't even
think of doing a simple code upgrade to a CORBA-based system. Even something SOAP-based would be questionable. Often code used originally could be replaced with something simple/cleaner/more powerful.
The beauty of Java is that you can keep old stuff running almost forever, unlike Microsoft-based systems, of which I've known a few whose functionality was literally measured in weeks. But regardless, the longer you let it run, the more expensive it will be to sort out all of the accumulated cruft and make it clean again.
As for recent experience along those lines, I can present the CodeRanch JForum, which I undertook to upgrade several years back, as the very operating system it runs under is long past end-of-life and thus subject to potential shutdown without warning. Here are some things I encountered:
1. The build was done in
Ant. No problem as such. So is
Tomcat. But vanilla Ant isn't good at tracking library versions, and like most major
JEE apps, JForum uses a ton of external libraries. I could have added Ivy to the Ant build to better deal with that, but we're not doing something so elaborate that Maven can't do it just as well, so I Mavenized it. So I had to track down the latest versions of all of the external libraries and plug those version numbers into my POM. A few libraries aren't in the standard Maven archives and had to be manually defined to Maven. Also, in some cases, the package ownership had changed, meaning that the library's base name often also changed.
2. I ran the build and noted the things that didn't compile clean (if at all). These were generally due to package path changes, but sometimes also due to changes in the APIs that the libraries presented. Those had to be fixed. Also, because the current source builds under Java 8 and Java 9 and up have significant differences regarding introspection, I wanted to at least minimise the whining. Note that I never even
considered moving from javax EE to jakarta EE. There's a limit to how much mayhem even I am willing to introduce at one time. The project's target would be Tomcat 9.
3. Once I had something resembling a clean build, I started running the unit tests. A lot of testing was done using
Mockito and that uncovered 2 problems. First, since Mockito uses a LOT of introspection the bump from Java 8 to Java 17 wrought havoc with the compile-and-test process, so I had to clean that up. Secondly, the older version of Mockito was less stern about how you coded certain cases, so that in addition to having to upgrade test code to appease Mockito, there had been tests that weren't actually doing what the original authors thought they were doing that had to be fixed.
That brings me to the point where it's ready to be beta-tested. But there's more.
4. To be fully up-to-date, the javax stuff needs to be changed to Jakarta. For a smaller project I was able to do most of that using an app someone had written to scan and change source code while being aware that not every javax actually became jarkarta. It did most of the job, but some manual tweaking was still needed.
5. There are, alas, several characteristics of the current jforum that violate what we tell others is good practice. I think I could probably repair that without a whole lot of trouble, but, again, that's too much for the first stages of upgrade.
6. And, of course, in addition to the app itself, changes have to be made regarding the automated build and test processes, deployment and OS integration.