如何使用dart-maven-plugin构建dart项目? [英] How to build dart project with dart-maven-plugin?

查看:183
本文介绍了如何使用dart-maven-plugin构建dart项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用Maven构建我的Dart项目。



我发现了 dart-maven-plugin 为这个目标,它适用于解决依赖关系。



在Dart中,我用两个命令编译我的项目:


  1. pub get


  2. pub版本


所以,当我写

  mvn dart:pub 



它获得所有的依赖。



现在我需要构建我的项目。所以,我写

  mvn dart:pub -DpubCommand = build 

但它仍然解决依赖项,它不会构建项目!



dart-maven-plugin

解决方案

我写了错误的参数名称。正确的将是:

  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:

  1. pub get

  2. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆