Nexus Hosted repository

I’ve encountered an issue with a Nexus hosted repository I set up. Previously, I had an older version of “example.jar” stored in the repository. Later, I manually uploaded an updated version of “example.jar” to the same hosted repository but in a different path. However, for some reason, the artifact “example.jar” is getting renamed to “example.jar.lastupdated”. This renaming is causing my build to fail because my pom file is unable to locate “example.jar”.

How do i resolve it?

That’s unusual, I’m not aware of any Nexus Repository functionality to rename things like that. Repository considers the name to be a component’s coordinate, so renaming it is basically making it completely inaccessible.

What version are you using, and what type of repository is it? (maven hosted? raw?)

I have Nexus version 3.65.0-02, and I’m using a Maven hosted repository. I have two identical artifacts with different versions in that hosted repo. However, during the build process, when the client server goes to the Nexus Maven-hosted repo and caches the artifacts, it throws an error stating that “example.jar” is missing. Upon troubleshooting, I found that when it caches the external artifacts on the client server from Nexus, it renames the artifacts in the Maven-Hosted repo and adds “.lastupdated”. This issue occurred only when I manually uploaded artifacts in the hosted repo and they were renamed during the build process.

I suppose this is some Maven functionality on the client server that renames the artifacts because I cannot see the artifacts renamed as “.lastupdated” on the Nexus UI. It happens only when the client server goes to Nexus for artifacts and renames them upon caching.

The “.lastupdated” file is a marker file on disk, Maven uses it to record the fact that it couldn’t find the requested file. It won’t request the file it couldn’t find again until the time specified in the repository’s updatePolicy setting in your settings.xml expires. You can override this by running maven with the “-U” flag.