1

I've had a java maven project, and now I converted to gradle because I have to write some cutom build script.

I'm wondering if I still need to keep pom.xml. Do I need to add my dependencies to pom.xml, or I should get rid of pom.xml and add them to build.gradle ? Does gradle replace maven ?

Arian
  • 7,397
  • 21
  • 89
  • 177
  • You converted a whole project from Maven to Gradle, and now wonder if gradle replaces Maven? What would be the point of such a conversion if you still needed to have a pom? If really ths question needs to be asked, why not try removing the pom file firt, before asking? – JB Nizet Nov 25 '17 at 10:54
  • Why eclipse does not remove `pom.xml` when it's converting maven to gradle project? What's the point ? – Arian Nov 25 '17 at 11:02
  • Ah, so you didn't convert anything. Eclipse did it for you. It probably keeps it because you might still want it. Or because it wasn't able to convert all of your maven build to gradle. – JB Nizet Nov 25 '17 at 11:05

1 Answers1

3

Gradle and Maven are two different build systems. They are quite the same but have some differences. But if you convert your maven project to gradle, then your pom.xml is useless from now on. You can easily convert your maven project to gradle using gradle's incubating feature with this command gradle init --type pom. Then your scripts will be added to build.gradle file. This is still an incubating feature though. You can also do it from stract. I suggest you to read the following document.

Oguz Ozcan
  • 1,497
  • 13
  • 21