.m2 is not getting updated with latest xmlbeans jar files

1k Views Asked by At

I do have a jenkins job that builds XML beans jar files from the internal gitlab project and puts it on the artifactory. While having a build, this XML beans jar files are downloaded to the .m2 maven local repository. However, if this jar file exists in the .m2 repository then maven does not bother to download it from the artifactory. With being said, if there is a gitlab change, it does build it and put it on the artifactory. As there is already a jar file exist in .m2 repository, an old jar file is not being replaced with the new one. We ended up a wrong dependency to the customer with a release. The question is , What am I doing wrong here?

1

There are 1 best solutions below

1
On BEST ANSWER
mvn clean install -U

-U means maven will force update snapshot dependencies. Release dependencies can't not be updated this way.