Blade Deploy Does Not Support WAR Files

Liferay's Blade CLI is an easy way for Liferay developers to create new Liferay modules. One of its features is to deploy modules, as described in the Deploying Modules with Blade CLI documentation. Unfortunately, at this time, Blade does not support deploying .war files, though a new feature request has been created to notify the engineers of this request.

If you try to deploy .war files with Blade, you'll see an error like this:

blade deploy
:assemble UP-TO-DATE
Using native Sass compiler
Parsed /css/main.scss in 577ms


Total time: 6.971 secs
  0. [Jar.<init>] java.lang.IllegalArgumentException: A Jar can only accept a file or directory that exists: D:\Projects\NPL\test-blade-error\wars\my-spring-mvc-portlet-project\build\libs\my-spring-mvc-portlet-project.jar


There are two workarounds:

  1. Copy the .war file manually into your Liferay/deploy folder
  2. Install the .war using Gogo shell using the following example command:
blade sh install webbundle:${path to war}?Web-ContextPath=/${contextName}

An example of this would be:

blade sh install webbundle:D:\Projects\NPL\test-blade-error\wars\my-spring-mvc-portlet-project\build\libs\my-spring-mvc-portlet-project.war?Web-ContextPath=/my-spring-mvc-portlet-project
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0