Enforce naming conventions for uploaded artifacts


(Francois Ritaly) #1

I maintain a massive multi-module build which deploys a lot of artifacts to Nexus. As per a company policy, the uploaded artifacts are supposed to be named like “<company>-<artifact>”.

Because a lot of developers are involved in this project, I sometimes discover that the artifact names don’t comply with the policy.

How could I setup a fail fast check just after the configuration time to enforce the name of all uploaded artifacts ?

I tried playing with the allprojects closure plus the configuration named “archives” to validate the artifacts to be uploaded but haven’t been successful so far.