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可以管理模块的依赖关系,并产生可以替代这些模块的 ...
随机推荐
- Eclipse简介和使用技巧快捷方式
1Eclipse简介和使用 IDE(Integrated Development Environment ): 集成开发环境,集合开发.运行.调试于一体的一个软件 Eclipse 是一个开放源代码的. ...
- 【NPR】漫谈轮廓线的渲染
写在前面 好久没写文章.最近在看<Real Time Rendering, third edition>这本书,看到了NPR这一章就想顺便记录下一些常见的轮廓线渲染的方法. 在非真实感渲染 ...
- 6.5、Android Studio的Android Device Monitor
Android Device Monitor是一个独立的工具,可以对Android应用进行调试和分析.Android Device Monitor无需安装整合在一个IDE中,比如像Android St ...
- NV12和NV21转rgb
void NV21_T_RGB(unsigned int width , unsigned int height , unsigned char *yuyv , unsigned char *rgb) ...
- Uva - Uva272 - TEX Quotes
TeX is a typesetting language developed by Donald Knuth. It takes source text together with a few ty ...
- const引用
在C++中可以声明const引用 const Type& name = var: const引用让变量拥有只读属性 const int &a = b const int &a ...
- 图文浅析Binder机制
总述: Binder是Android系统提供的一种IPC机制,Android系统基本就可以看做基于Binder的C/S架构,Binder也是C/S形式出现,它属于驱动但是驱动的一段内存而不是设备,框架 ...
- 【一天一道LeetCode】#83. Remove Duplicates from Sorted List
一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder's Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Given a ...
- 1. MariaDB简介
作者: 铁锚 日期: 2013年9月21日 官方博客地址:https://mariadb.org/ 官网地址: https://mariadb.com/ 百度百科地址: http://baike.ba ...
- Linux信号实践(2) --信号分类
信号分类 不可靠信号 Linux信号机制基本上是从UNIX系统中继承过来的.早期UNIX系统中的信号机制比较简单和原始,后来在实践中暴露出一些问题,它的主要问题是: 1.进程每次处理信号后,就将对信号 ...