Converting a maven project to gradle

Updated: 13 July 2014
With gradle 2.0 released on 1st July 2014, it was time to relook and update this write-up suitably. gradle is in active development and has evolved a lot. It is now the new android build tool.

Now the idea was to create a gradle build script for an existing maven project. The best way to start off was by looking at the documentation.

There is no shortage of information, but my idea was not to learn gradle from a to z, but to see how quickly I could create a build script for my maven project. I looked around but could find nothing like a one-to-one mapping of maven pom.xml to build.gradle.

There is a gradle build init plugin, which can be applied on a maven pom to bootstrap a gradle script. It does a simple one-to-one conversion of maven dependencies to gradle, but not much beyond. For instance, it did not automatically apply 'war' plugin. It also did not detect I was using testNG.

Thanks for posting such a Useful information .You done a great job.and also we are providing E-Learning Portal Videos for students and working ProfessionalsHurry Up! Bag All Courses in Rs - 10000 /- + taxes41 Career building courses.Designed by 33 industrial experts600+ hours of video ContentDevOps and Cloud E-Learning Portal

Post a Comment

Popular Posts

My colleague calls me this morning. "Hey, I have a couple of Word documents in Kannada. When I open it, it shows gibberish. I tried installing Kannada fonts but may have messed it up. Can you try?"

I had Microsoft World 2013. I opened the doc and not surprisingly, saw gibberish. Now the question was what font to install. A search for kannada fonts gave a large number of results. There were several kannada fonts available.

I tried with Baraha font from this site. No luck.
Then I moved on to this one. Same issue.

It didn't take much time for me to figure out that I needed the same font that had been used in creating the doc. Now how does that one get that info?

A couple of days back, our LPG cylinder got over. Since we have a second cylinder, we opened it up to connect that to the regulator. After connecting, when we switched on the regulator, we could hear a hissing sound - the sound of gas escaping.

We tried this a couple of times - there was no mistake. There was a leak.

There are three numbers for gas leaks printed on the LPG receipt - a land line and two cell numbers. We dialed one of the cell numbers. The recipient, in turn, gave us another number. That number rang but no one picked up.

After a few minutes, we tried the number again. This time it was picked up. The receiver noted down the details and said someone will come in a couple of hours.

This was around 7 AM.

The person from Indane (or was it IOC) came around 10.30 AM. Even before coming, we asked him, if we would get a replacement cylinder. He said that that would not be required as he suspected the washer of the cylinder was bad.

A new branch of SBI opened near my home. Like other Banks, this one had safe deposit lockers. My wife made a visit to the Branch to enquire about availability of locker.

She was told that the lockers were available but one needed to open a fixed deposit of Rs.5 lakhs to get a small locker and a large amount to get a larger locker.

Me and my wife both have a Savings Bank account with SBI. We even have a fixed deposit. This did not apparently matter.

An aunt of ours works in SBI and we told her this. She was deputed to this branch for a couple of days when the regular manager was on leave.

She helped us do the necessary formalities which helped us initiate transfer of our existing account to this branch and get us a locker. She did request us to place a fixed deposit, just so that the regular Bank manager would be happy.

We were really lucky. The regular Manager was pretty unhappy that a locker was issued without "sufficient" fixed deposit being made. It was evident t…