如何使用dart-maven-plugin构建dart项目? [英] How to build dart project with dart-maven-plugin?
问题描述
我需要使用Maven构建我的Dart项目。
我发现了 dart-maven-plugin 为这个目标,它适用于解决依赖关系。
在Dart中,我用两个命令编译我的项目:
-
pub get
-
pub版本
所以,当我写
mvn dart:pub
它获得所有的依赖。
现在我需要构建我的项目。所以,我写
mvn dart:pub -DpubCommand = build
但它仍然解决依赖项,它不会构建项目!
解决方案我写了错误的参数名称。正确的将是:
mvn dart:pub -Ddart.pub.command = build
还有示例项目名称 - dart-maven-plugin-example
不要构建此项目将不会构建原因在一些子项目中没有web文件夹。
希望它将帮助其他人。
I need to build my Dart project with Maven.
I've found dart-maven-plugin for this goal, and it works fine for resolving dependencies.
In Dart I compile my project with two commands:
pub get
pub build
So, when I write
mvn dart:pub
it gets all dependencies.
Now I need to build my project. So, I write
mvn dart:pub -DpubCommand=build
but it's still resolving dependencies, it doesn't build the project!
How can I build project with dart-maven-plugin?
解决方案I've wrote wrong parameter name. Correctly will be:
mvn dart:pub -Ddart.pub.command=build
Also there is example project name - "dart-maven-plugin-example"
Don't build this project, it will not build cause there is no web folder in some sub-projects.
Hope it will help some one else.这篇关于如何使用dart-maven-plugin构建dart项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!