I have a huge amount of local jar dependencies for legacy ant project. The names don't follow artifactId-version-classifier.jar
pattern. I want to replace such jars with artifacts from central repository if possible.
Is there a way to do it?
That is usually a lot of work.
You can compute the checksums and look them up. You can also look up the name and the version (if you know it).
Furthermore, the project probably only uses a small fraction as direct dependencies. The rest are transitive dependencies. So if you figure out the direct dependencies (from looking at the code) than resolving those would be enough. Maven will find the transitive ones automatically.