I’m a newbie to gradle. We have a maven multi-project build, which we are migrating to gradle build. gradle init seems to not translate the POM containing plugin configuration (inside tag) into corresponding task in build.gradle
Because of this we are having to convert all the plugin configurations from POM to build.gradle manually.
Is there any way we could convert those tags in pom.xml into build.gradle? Is there a list of POM tags which ‘gradle init’ can’t translate into build.gradle?
Some have maven configuration which is quite different from the Gradle equivalent configuration
Many maven plugins are not required in Gradle (a core gradle task an/or a snippet of groovy can often do the job)
For these reasons it’s difficult (impossible) to convert maven plugin declarations to the equivalent gradle script. Only a handful of plugins (if any) are supported for auto conversion by the Gradle init plugin.
Unfortunately you’ll need to do the plugin conversion manually yourself.
Maven properties in tag of pom.xml are not getting converted by gradle init. Is it expected behaviour?
And some of the dependencies in converted build.gradle file are missing when compared to pom.xml. Does this mean gradle init converts some of the stuff partially?
Is the working and behavior of ‘gradle init’ is documented somewhere?
What does maven do with dependencies with type=war? Does it put the war file in WEB-INF/lib? or does it unzip it and combine it with your sources? I’ve never seen a type=war dependency before. This is possibly an edge case that maven supports that Gradle doesn’t know how to handle. It feels like a bit of an anti-pattern to me (eg how do jars packed inside the war participate in dependency resolution?)
I’m not sure about the other missing dependency. Is this a local project in a multi module build? Or a totally separate project published/referenced from a repository?
Is there anything in the Gradle logs saying why the dependency was omitted?