Sandy
Sandy

Reputation: 507

Maven to Gradle migration

I'm trying to migrate my existing project from Maven to Gradle. I'm able to run the gradle init command successfully and the build.gradle file was also generated. One thing that I noticed is within my pom file, I specified the packaging as war, but post migration, I couldn't find the plugin war within build.gradle file. Is this the default behaviour of gradle? Do we need to explicitly specify the war plugin within build.gradle file?

Upvotes: 1

Views: 203

Answers (1)

Lakatos Gyula
Lakatos Gyula

Reputation: 4150

Yes, you should apply the war plugin explicitly.

The War plugin extends the Java plugin to add support for assembling web application WAR files. It disables the default JAR archive generation of the Java plugin and adds a default WAR archive task.

https://docs.gradle.org/current/userguide/war_plugin.html

Upvotes: 3

Related Questions