Tuesday, January 27, 2015

Building custom libs that are missing in maven central or jcenter

So you really need that java lib somebody made but they can't be bothered to upload it to maven central or jcenter? Build it yourself and host it on your nexus repo. That's what the script below does. Additionally, it includes a little xslt magic which allows to change the pom.xml in any way you want. Are they using snapshot versions? No problem, just insert your own (as shown in the script). Need to change a dependency? With some more xslt you can definitely do that too! You can run this script locally or on a build server (the script is using jenkins' BUILD_NUMBER environment variable).

Hope this is useful to someone. All you need to install is 'xsltproc'.

No comments:

Post a Comment