“释放"无法识别来自 sbt-release 插件的命令 [英] "release" command from sbt-release plugin is not recognized

查看:41
本文介绍了“释放"无法识别来自 sbt-release 插件的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我根本无法使用 sbt-release 插件.无法识别sbt release"命令.

I can't get the sbt-release plugin to work at all. The "sbt release" command is not recognized.

根据插件的文档,我将此条目添加到我的播放应用程序中的 ./project/plugins.sbt 文件中:

As per plugin's documentation, I have this entry added to my ./project/plugins.sbt file in my play application:

addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8.5")

而且我正在运行最新的 0.13.6 版本的 sbt 启动器.这是我从项目目录执行sbt release"时得到的错误:

And I'm running the latest to-date 0.13.6 version of sbt launcher. Here's the error that I get when I execute "sbt release" from my project directory:

[info] Loading project definition from /Users/Projects/project
[info] Loading [pom.xml]
[info] Use auto-generated Build object
[success] POM definition loaded
[info] Set current project to integration (in build file:/Users/Projects/project/)
[error] Not a valid command: release (similar: reload, eclipse, last)
[error] Not a valid project ID: release
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: release (similar: rpmRelease, rpm-release, resolvers)
[error] release
[error]        ^

为了确保 sbt-release 插件确实被加载到项目中,我执行sbt about",它确实显示 sbt-release 在可用插件列表中.但同样,由于某种原因,sbt release"命令无法识别.

And just to make sure, that sbt-release plugin does get loaded into the project, I execute "sbt about", and it does show that sbt-release is in the list of Available Plugins. But again, for some reason, "sbt release" command is not recognized.

> sbt about
...
[info] Available Plugins: ... sbtrelease.ReleasePlugin, ...

推荐答案

根据 sbt-release 插件文档,将此行添加到我的 build.sbt 文件中,它做到了!sbt release"命令现在正在被识别.

As per sbt-release plugin documentation, added this line into my build.sbt file, and it did it! "sbt release" command is now being recognized.

releaseSettings

出于某种原因,我之前第一次尝试它时它对我不起作用.我的环境或我的 build.sbt 文件的早期版本中一定发生了某些事情.

For some reason, it did not work for me the first time I tried it earlier. Something must have been going on in my environment or earlier version of my build.sbt file.

这篇关于“释放"无法识别来自 sbt-release 插件的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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