Failed to find the bundle manifest file 'frontend://vaadin-flow-bundle-mani

There is a document, that describes how to resolve this issue with maven build.
How to do it with gradle build ?

I tried to apply solution https://github.com/vaadin/vaadin.com/issues/44#issuecomment-398190538
Using Idea I set -Dvaadin.productionMode in the gradle build (Tasks: bootJar) as JVM arguments.
But I still have the same error.

#Vaadin doesn’t read this property from Spring Environment
vaadin.original.frontend.resources=true

Solution:

... class KUIServlet(context: ApplicationContext, ...) : SpringServlet(context) ...
...
    override fun createDeploymentConfiguration(initParameters: Properties?): DeploymentConfiguration {
	...
	        return super.createDeploymentConfiguration(initParameters!!.apply {
            this["original.frontend.resources"]
 = "true"
        })
...

Vitalii Lipovetskii:
There is a document, that describes how to resolve this issue with maven build.
How to do it with gradle build ?

Can you tell me where to find this document? I haven’t found it yet

https://vaadin.com/forum/thread/17170691/17171159
IE11 does not run ES6 JavaScript, thus transpilation to ES5 is needed, which is done by this
mvn jetty:run -Dvaadin.productionMode

In my Vaadin Gradle’s project:

build.gradle:

plugins {
    kotlin("jvm") version "1.3.20"
    id ("com.github.johnrengelman.shadow") version "4.0.3"
    id ("com.devsoap.vaadin-flow") version "1.0"
    id ("org.gretty") version "2.3.1"
}

val kotlinVersion = "1.3.20" //by extra("1.3.20")
val jettyVersion = "9.4.14.v20181114"
val vaadinVersion = "12.0.4"

vaadin.autoconfigure()

vaadin{
    setProductionMode(true)
}
val shadowJar by tasks.getting(ShadowJar::class) {
    manifest.attributes["Main-Class"]
 = "myproject.Main.class"

    mergeServiceFiles()
}

I build project by Gradle’s pluggin shadowjar.
And it’s work fine.
I start jar like this:

java -Dlogback.configurationFile=logback.xml -jar myproject.jar

And project start success and I success open web page. Nice.

But I need to use production mode.
So I start my jar like this:

java -Dvaadin.productionMode=true -Dlogback.configurationFile=logback.xml -jar myproject.jar

It’s success start.
Nice.

But when I try to open web page I get error:

2019-03-13 13:12:42,080 20672 [qtp495792375-16]
 WARN  o.e.j.s.handler.ContextHandler.ROOT - unavailable
java.lang.IllegalArgumentException: Failed to find the bundle manifest file 'frontend://vaadin-flow-bundle-manifest.json' in the servlet context for 'ES6' browsers. If you are running a dev-mode servlet container in maven e.g. `jetty:run` change it to `jetty:run-exploded`. If you are not compiling frontend resources, include the 'vaadin-maven-plugin' in your build script. Otherwise, you can skip this error either by disabling production mode, or by setting the servlet parameter 'original.frontend.resources=true'.
	at com.vaadin.flow.server.startup.BundleFilterFactory.readBundleManifest(BundleFilterFactory.java:89)
	at com.vaadin.flow.server.startup.BundleFilterFactory.createBundleFilterForBrowser(BundleFilterFactory.java:79)
	at com.vaadin.flow.server.startup.BundleFilterFactory.createFilters(BundleFilterFactory.java:70)
	at com.vaadin.flow.server.VaadinService.init(VaadinService.java:275)
	at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:201)

In my Vaadin Gradle’s project:

build.gradle:

plugins {
    kotlin("jvm") version "1.3.20"
    id ("com.github.johnrengelman.shadow") version "4.0.3"
    id ("com.devsoap.vaadin-flow") version "1.0"
    id ("org.gretty") version "2.3.1"
}

val kotlinVersion = "1.3.20" //by extra("1.3.20")
val jettyVersion = "9.4.14.v20181114"
val vaadinVersion = "12.0.4"

vaadin.autoconfigure()

vaadin{
    setProductionMode(true)
}
val shadowJar by tasks.getting(ShadowJar::class) {
    manifest.attributes["Main-Class"]
 = "myproject.Main.class"

    mergeServiceFiles()
}

I build project by Gradle’s pluggin shadowjar.
And it’s work fine.
I start jar like this:

java -Dlogback.configurationFile=logback.xml -jar myproject.jar

And project start success and I success open web page. Nice.

But I need to use production mode.
So I start my jar like this:

java -Dvaadin.productionMode=true -Dlogback.configurationFile=logback.xml -jar myproject.jar

It’s success start.
Nice.

But when I try to open web page I get error:

2019-03-13 13:12:42,080 20672 [qtp495792375-16]
 WARN  o.e.j.s.handler.ContextHandler.ROOT - unavailable
java.lang.IllegalArgumentException: Failed to find the bundle manifest file 'frontend://vaadin-flow-bundle-manifest.json' in the servlet context for 'ES6' browsers. If you are running a dev-mode servlet container in maven e.g. `jetty:run` change it to `jetty:run-exploded`. If you are not compiling frontend resources, include the 'vaadin-maven-plugin' in your build script. Otherwise, you can skip this error either by disabling production mode, or by setting the servlet parameter 'original.frontend.resources=true'.
	at com.vaadin.flow.server.startup.BundleFilterFactory.readBundleManifest(BundleFilterFactory.java:89)
	at com.vaadin.flow.server.startup.BundleFilterFactory.createBundleFilterForBrowser(BundleFilterFactory.java:79)
	at com.vaadin.flow.server.startup.BundleFilterFactory.createFilters(BundleFilterFactory.java:70)
	at com.vaadin.flow.server.VaadinService.init(VaadinService.java:275)
	at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:201)
	
	```
	at java.lang.Thread.run(Unknown Source)
2019-03-13 13:12:42,083 20675 [qtp495792375-16]
 WARN  o.eclipse.jetty.server.HttpChannel - /booking-v2
javax.servlet.ServletException: com.vaadin.flow.server.startup.ServletDeployer@a1f5568f==com.vaadin.flow.server.VaadinServlet,jsp=null,order=-1,inst=false,async=true
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:693)
	at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:521)
	at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:805)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:537)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)