Aug 2, 2018

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
Up to Spec: JavaScript Numeric Separators
Let's take a look at the proposal to add Numeric Separators to the JavaScript specification.
Using Conftest to Validate Configuration Files
Conftest is a utility within the Open Policy Agent ecosystem that helps simplify writing validation tests against configuration files. In a previous blog post, I wrote about using the Open Policy Agent utility directly to […]
SwiftGen with Image & Color Asset Catalogs
You might remember back in 2015 when iOS 9 was introduced, and we were finally given a way to manage all of our assets in one place with Asset Catalogs. A few years later, support […]
Tracking Original URL Through Authentication
If you read my other post about refreshing AWS tokens, then you probably have a use case for keeping track of the original requested resource while the user goes through authentication so you can route […]