IVY构建,我怎么使用EXTLIB目录中的项目? [英] IVY Build, how do I use an extlib directory in the project?

查看:172
本文介绍了IVY构建,我怎么使用EXTLIB目录中的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有几个jar文件,这是从我们保持我们的项目的EXTLIB文件夹在项目的根目录COTS产品。我想有这些包含在常青藤,而不是放在资源库,刚读从项目/ EXTLIB文件夹中。这是可能的,或者我需要将它们添加到artifactory的?

There are several jar files, which are from a COTS product that we keep in our project's "extlib" folder at the root of the project. I want to have these included in ivy, but not put in the repository, just read from the project/extlib folder. Is this possible or do I need to add them to the artifactory?

推荐答案

创建常春藤设置有以下内容的文件:

Create an ivy settings file with the following content:

<ivysettings>
  <settings defaultResolver='artifactory' />
  <resolvers>
    <ibiblio name='artifactory' m2compatible='true' root="http://my.artifactory.server"/>
    <filesystem name='local'>
      <artifact pattern='${ivy.settings.dir}/extlib/[artifact]' />
    </filesystem>
  </resolvers>
  <modules>
    <module organisation='NA' resolver='local' />
  </modules>
</ivysettings>

和声明你的依赖关系如下:

And declare your dependencies as follows:

  <dependencies>
    <dependency org='org.apache.tomcat' name='tomcat-api' rev='7.0.21' />
    ..
    ..
    <dependency org='NA' name='myspecial.jar' rev='NA' />
  </dependencies>

特殊NA组织被配置为从EXTLIB目录拉文件。修订属性是manadatory而是指存储在项目目录中的文件时,通常意义的。

The special "NA" organisation is configured to pull files from the "extlib" directory. The revision attribute is manadatory but generally meaningless when referring to files stored within the project directory.

这篇关于IVY构建,我怎么使用EXTLIB目录中的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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