vaadin应用程序与gradle安装节点在生产中
我一直在和Vaadin ICW Gradle一起玩。当我使用-pvaadin.productionmode构建应用程序时,然后在日志记录中执行JAR时,我会看到FrontendTools安装节点。
根据文档,我希望Java应用程序能够为所有JS提供服务,并且在运行时不需要节点的依赖关系/安装。
2022-04-05 20:25:19.344 INFO 8 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-04-05 20:25:19.351 INFO 8 --- [ main] c.xxx.xxxx.configuration.Application : Started Application in 4.142 seconds (JVM running for 4.475)
2022-04-05 20:25:19.431 INFO 8 --- [ main] c.a.b.c.data.generator.DataGenerator : Generating demo data
2022-04-05 20:25:19.431 INFO 8 --- [ main] c.a.b.c.data.generator.DataGenerator : ... generating 100 Configuration entities...
2022-04-05 20:25:19.459 INFO 8 --- [ main] c.v.flow.server.frontend.FrontendTools : Couldn't find node. Installing Node and npm to /home/myuser/.vaadin.
2022-04-05 20:25:19.469 INFO 8 --- [ main] NodeInstaller : Installing node version v16.14.2
我需要设置属性或标志吗?这些示例主要是基于Maven的,也许我需要在Gradle中做更多的事情?
我这样的建造: gradle -pvaadin.productionmode
运行:defaultTasks(“清洁”,“ vaadinbuildfrontend”,“ build”)
I've been playing with vaadin icw gradle. When I build the application with the -Pvaadin.productionMode and then execute the jar, in the logging I see the FrontendTools installing node.
Based on the documentation I would expect the Java app to serve all js, and there needn't be a dependency/installation needed of node at runtime.
2022-04-05 20:25:19.344 INFO 8 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-04-05 20:25:19.351 INFO 8 --- [ main] c.xxx.xxxx.configuration.Application : Started Application in 4.142 seconds (JVM running for 4.475)
2022-04-05 20:25:19.431 INFO 8 --- [ main] c.a.b.c.data.generator.DataGenerator : Generating demo data
2022-04-05 20:25:19.431 INFO 8 --- [ main] c.a.b.c.data.generator.DataGenerator : ... generating 100 Configuration entities...
2022-04-05 20:25:19.459 INFO 8 --- [ main] c.v.flow.server.frontend.FrontendTools : Couldn't find node. Installing Node and npm to /home/myuser/.vaadin.
2022-04-05 20:25:19.469 INFO 8 --- [ main] NodeInstaller : Installing node version v16.14.2
Is there a property or flag I need setting? The examples are mostly maven based perhaps I need to do a little bit more in gradle?
I build like so:gradle -Pvaadin.productionMode
Which runs: defaultTasks("clean", "vaadinBuildFrontend", "build")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在消除和检查基本gradle示例和我自己的项目之间的所有差异之后:
罪魁祸首正在使用
com.vaadin.exampledata.exampledatagenerator
来设置一些虚假的数据。如果我不这样做,节点将不确定
是错误还是功能。
After eliminating and checking all differences between the base gradle example and my own project:
The culprit was using the
com.vaadin.exampledata.ExampleDataGenerator
to setup some bogus data.If I don't, node won't install ¯_(ツ)_/¯
Not sure if that is a bug or a feature.