Erlang Rebar 使用指南之四:依赖管理
Erlang Rebar 使用指南之四:依赖管理
全文目录:
https://github.com/rebar/rebar/wiki
本章链接:
https://github.com/rebar/rebar/wiki/Dependency-management
1 rebar依赖定义
Rebar取得和构建符合OTP/Rebar规范的项目。如果项目包含子项目,Rebar会自动递归地构建它们。
项目的依赖在project_dir/rebar.config中定义,形式如下:
{deps, [Dependency1, Dependency2, ...]}.
其中每一项(Dependency?)都按照{App, VsnRegex, Source, [raw]
}定义:
- 'App' 指定OTP应用名称,可以是atom或字符串
- 'VsnRegex' 用于匹配版本号的正则表达式
- 'Source' 按照下面的格式指定OTP应用的地址:
{hg, Url, Rev} Fetch from mercury repository {git, Url} Fetch from git repository {git, Url, {branch, Branch}} Fetch from git repository {git, Url, ""} == {git, Url, {branch, "HEAD"}} Fetch from git repository {git, Url, {tag, Tag}} Fetch from git repository {git, Url, Rev} Fetch from git repository {bzr, Url, Rev} Fetch from a bazaar repository
[raw]
是可选的。包含[raw]的依赖项不要求安装Erlang/OTP的项目结构。项目编译时,该依赖项不会自动被编译,但是下面的命令对其有作用:
get-deps update-deps check-deps list-deps delete-deps
2 rebar.config的例子
{deps, [ {em, ".*", {git, "https://github.com/sheyll/erlymock.git"}}, {nano_trace, ".*", {git, "https://github.com/sheyll/nano_trace.git", {branch, "feature/rebar-migration"}}}, {mochiweb, "2.3.2", {git, "https://github.com/mochi/mochiweb.git", {tag, "v2.3.2"}}}, % Or specify a revision to refer a particular commit, useful if the project has only the master branch % {mochiweb, "2.3.2", {git, "https://github.com/mochi/mochiweb.git", "15bc558d8222b011e2588efbd86c01d68ad73e60"}, % An example of a "raw" dependency: {rebar, ".*", {git, "git://github.com/rebar/rebar.git", {branch, "master"}}, [raw]} ]}.
Erlang Rebar 使用指南之四:依赖管理的更多相关文章
- Erlang Rebar 使用指南之三:Rebar和OTP程序约定和命令
Erlang Rebar 使用指南之三:Rebar和OTP程序约定和命令 全文目录: https://github.com/rebar/rebar/wiki 本章位置: https://github. ...
- Erlang Rebar 使用指南之一:入门篇
Erlang Rebar 使用指南之一:入门篇 全文目录: https://github.com/rebar/rebar/wiki 本章原文: https://github.com/rebar/reb ...
- Erlang Rebar 使用指南之二:制作发布版本
Erlang Rebar 使用指南之二:制作发布版本 全文目录: https://github.com/rebar/rebar/wiki 本章位置: https://github.com/rebar/ ...
- Java Gradle入门指南之依赖管理(添加依赖、仓库、版本冲突)
开发任何软件,如何管理依赖是一道绕不过去的坎,软件开发过程中,我们往往会使用这样那样的第三方库,这个时候,一个好的依赖管理就显得尤为重要了.作为一个自动构建工作,Gradle对依赖管理有着很好 ...
- Gradle 1.12用户指南翻译——第五十章. 依赖管理
本文由CSDN博客貌似掉线翻译,其他章节的翻译请参见:http://blog.csdn.net/column/details/gradle-translation.html翻译项目请关注Github上 ...
- Asp.Net MVC4.0 官方教程 入门指南之四--添加一个模型
Asp.Net MVC4.0 官方教程 入门指南之四--添加一个模型 在这一节中,你将添加用于管理数据库中电影的类.这些类是ASP.NET MVC应用程序的模型部分. 你将使用.NET Framewo ...
- 在Eclipse中使用建立使用Gradle做依赖管理的Spring Boot工程
前述: Gradle存在很长时间了,以前只知道Maven和ivy ,最近才知道有这个存在,因为以后要用这个了; 所以,要先学会怎么用这个工具,就从建立一个简单工程开始! 实际上以前是见过Gradle的 ...
- Gradle Maven 依赖管理
仓库管理简介 本质上说,仓库是一种存放依赖的容器,每一个项目都具备一个或多个仓库. Gradle支持以下仓库格式: Ivy仓库 Maven仓库 Flat directory仓库 我们来看一下,对于每一 ...
- webpack模块依赖管理介绍
http://webpack.github.io/docs/ webpack is a module bundler. 是一个模块管理器 webpack可以管理模块的依赖关系,并产生可以替代这些模块的 ...
随机推荐
- XML Condition And
<Target Name="CustomBuildStep" Condition="'@(CustomBuildStep)' != '' and '$(Select ...
- [Centos7] bbc tools安装
作者 运维开发群 @军爷,bbc是什么? 请参考 Brendan大爷的博客 Linux 4.9's Efficient BPF-based Profiler 更新到最新 CentOS 7.3 1611 ...
- 目标管理体系:OKR
一.什么是OKR体系? OKR体系的全称是Objectives & Key Results,即目标与关键成果.所谓OKR,O = Objective 可以理解为企业目标,KR =Key Res ...
- Spring之ORM模块
ORM模块对Hibernate.JDO.TopLinkiBatis等ORM框架提供支持 ORM模块依赖于dom4j.jar.antlr.jar等包 在Spring里,Hibernate的资源要交给Sp ...
- 详解EBS接口开发之应收INVOICE导入
(一)应收INVOICE常用标准表简介 1.1 常用标准表 如下表中列出了与应收INVOICE导入相关的表和说明: 表名 说明 其他信息 RA_BATCH_SOURCES_ALL AR事务处理来源 ...
- SpriteKit中为何不要在update方法中测试碰撞
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 我们若要在游戏中做碰撞检测有2种办法,一是利用物理引擎,二是自 ...
- Web Service进阶(三)HTTP-GET, HTTP-POST and SOAP的比较
XML Web Service支持三种协议来与用户交流数据.这三种协议分别是: 1.SOAP:Simple Object Access Protocol 2.HTTP-GET 3.HTTP-POST ...
- Android事件分发回传机制
转载本博客,请注明出处:点击打开链接 http://blog.csdn.net/qq_32059827/article/details/52489026 之前以一个爷爷给孙子分馒头的故事,初探了安 ...
- 【并发编程】AIDL关键字
oneway Oneway interfaces In early betas, the Android IPC was strictly synchronous. This means that s ...
- shell的date日期循环方法:日期格式转时间戳计算,再将时间戳转回日期格式
1,日期对象转时间戳current_day 2,计算增量的时间戳,即循环每步的增量one_day 3,循环体计算,日期变量加增量后重新赋值自己 4,时间戳转回日期格式后输出 current_day=2 ...