Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use maven's pom.xml for gradle build dependencies?

My question is fairly simple. I have a maven java project and I would like to build it with gradle. currently I have a pom.xml file where I'm managing dependencies, as well as a build.gradle file where I list each of these dependencies as:

// build.gradle file:
dependencies {
     compile (
        <some groupId>:<some artifactId>:<some version>,
        etc.
    )
}

I'd really like to avoid this redundancy but I do not see any way to have the build.gradle file integrate pom.xml into it's dependencies. Any help on this would be greatly appreciated.

like image 702
nikolauspschuetz Avatar asked Dec 07 '25 13:12

nikolauspschuetz


1 Answers

You just maintain your pom.xml with all your latest dependencies. At last run >gradle init command to convert your latest pom into build.gradle. So this will copy all dependencies from pom.xml file to build.gragle.

sample - https://docs.gradle.org/current/userguide/migrating_from_maven.html#migmvn:automatic_conversion

like image 100
Kavishankar Karunakaran Avatar answered Dec 09 '25 03:12

Kavishankar Karunakaran