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
Android Development for iOS Developers
Android development has greatly improved since the early days. Maybe you tried it out when Android development was done in Eclipse, emulators were slow and buggy, and Java was the required language. Things have changed […]
Add a custom object to your Liquibase diff
Adding a custom object to your liquibase diff is a pretty simple two step process. Create an implementation of DatabaseObject Create an implementation of SnapshotGenerator In my case I wanted to add tracking of Stored […]
Keeping Secrets Out of Terraform State
There are many instances where you will want to create resources via Terraform with secrets that you just don’t want anyone to see. These could be IAM credentials, certificates, RDS DB credentials, etc. One problem […]
Validating Terraform Plans using Open Policy Agent
When developing infrastructure as code using terraform, it can be difficult to test and validate changes without executing the code against a real environment. The feedback loop between writing a line of code and understanding […]