Could not transfer artifact com.atlassian.bitbucket.server:bitbucket-git:jar:7.21.7

I am trying to compile a Bitbucket server v7.21.7 plugin and i get the following when trying to add the bitbucket-git package

the link that it says that it is downloading from exists and i can manually download the jar from it

Downloading from atlassian-public: https://packages.atlassian.com/maven-external/com/atlassian/bitbucket/server/bitbucket-mesh-callback/0.9.3/bitbucket-mesh-callback-0.9.3.jar
Downloading from atlassian-public: https://packages.atlassian.com/maven-external/com/atlassian/bitbucket/server/bitbucket-git/7.21.7/bitbucket-git-7.21.7.jar

the following artifacts could not be resolved: com.atlassian.bitbucket.server:bitbucket-git:jar:7.21.7, com.atlassian.bitbucket.server:bitbucket-mesh-callback:jar:0.9.3: Could not transfer artifact com.atlassian.bitbucket.server:bitbucket-git:jar:7.21.7 from/to atlassian-public (https://packages.atlassian.com/maven-external): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

moved to another machine and issue goes away