Converting Maven Dependencies to Gradle

I had the, er, honor of converting an old ANT build to Gradle. It was one of those with the directories filled with jars and was having a hard time figuring out what dependency was still in use, what the versions were, etc. That is when I found a pom.xml file hidden away. It seems that the build process including manually supporting this Maven POM as well and the ANT build to get it to Artifactory.

I looked at the dependency list — not too long but longer than I wanted to copy, paste and manipulate. With any Googling, I quickly wrote my own Python script for it. That worked well for a first swipe. I had to do some tweaking for exclusions, etc, but it wasn’t a complicated script. See my Gist and convert away!

About the Author

Mike Hostetler profile.

Mike Hostetler

Principal Technologist

Mike has almost 20 years of experience in technology. He started in networking and Unix administration, and grew into technical support and QA testing. But he has always done some development on the side and decided a few years ago to pursue it full-time. His history of working with users gives Mike a unique perspective on writing software.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Blog Posts
Modern Development Environment for C++: Part 2
In Part 1 of this series, I gave a quick overview of each tool in the development environment and how I came to the conclusion that the tool was a good fit. Today I’m going […]
Mock Intl and Date globals in Jest
In Javascript land, mocking the browser global objects can be a bit of a pain for tests. Searching StackOverflow gives plenty of complicated answers. Some suggesting using 3rd party mock libraries. Some that overwrite the […]
Bitbucket Parameterized Pipelines
Introduction I’d like to address how to handle lots of deployment environments withinBitBucket Pipelines. Below I’m presenting two options: Using tags to parameterize builds Using the BitBucket API to pass variables Lots of Environments There […]
AWS Cloud HSM, Docker and NGINX
There is quite a bit of easily searchable content on the security benefits of leveraging a Hardware Security Module to manage cryptographic keys, so I will leave that to the scope of another article. The […]