如何使用 gradle 在 liferay 7 中创建 .war 文件?

How to create .war file in liferay 7 with gradle?

我正在使用 gradle 和 eclipse 编辑器开发 liferay7 应用程序。现在我想为 tomcat 生成 .war 文件。如何创建 .war 文件?

apply plugin: 'war' 应该就是您所需要的。

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

对于 Liferay 7,我认为我们应该按照说明使用 .jar 文件 here :

Once you finish developing your project, you can use Gradle to build your project’s JAR file and use Blade CLI to deploy your module to Liferay Portal’s module framework.