I have a Jenkins instance that automatically uploads artifacts to a remote Archiva repository. The artifacts uploaded include the build number, but it is only incrementing the builds sequentially so a failed Jenkins build causes the build numbers to become off. For example, my first build of MyProject uploads MyProject-1.jar to Archiva. If the next build fails, and then the third build succeeds, the artifact uploaded will be MyProject-2.jar, even though it was the third build on Jenkins. Is there a way to link these two build numbers for better tracking?
I am using Apache Archiva 2.2.0 and Jenkins 2.263.1