常春藤对外部JAR的依赖 [英] ivy dependency on external JAR

查看:81
本文介绍了常春藤对外部JAR的依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与Ivy作战(我尝试过Maven,但在为Hibernate设置JBoss存储库方面遇到了更大的困难).

I am battling with Ivy (I tried maven but had an event more difficult time setting up the JBoss repository for Hibernate).

快速提问-我正在使用这个很棒的软件包: http://ooweb.sourceforge.net/index.html

Quick question - I am using this wonderful package: http://ooweb.sourceforge.net/index.html

不幸的是,JAR仅可通过Sourceforge使用: http://sourceforge.net/projects/ooweb/files/ooweb/0.8.0/ooweb-0.8.0-bin.tar.gz/download

Unfortunately, the JAR is only available through Sourceforge: http://sourceforge.net/projects/ooweb/files/ooweb/0.8.0/ooweb-0.8.0-bin.tar.gz/download

有没有办法让Ivy下载特定的JAR?

Is there a way to get Ivy to download a specific JAR?

就此而言,可以使用Maven吗?

For that matter, is it possible to do with Maven?

或者说,Gradle怎么样?

Or for that matter, how about Gradle?

谢谢! 米莎

推荐答案

让我们看看我是否正确理解了您..

Let's see if I understood you correctly ..

我不能代表常春藤,但是使用Maven,有时需要手动将JAR安装到存储库中,例如本地存储库,以及可能在构建软件时使用的存储库.

I can't speak for Ivy, but with Maven, you will sometimes have to install JARs manually to a repository, such as your local and possibly the one used when building your software.

将jar下载到驱动器上,然后在命令行上执行以下操作:

Download the jar to your drive, and do something like this on command line:

mvn install:install-file -Dfile=ooweb.jar -DgroupId=ooweb -DartifactId=ooweb -Dversion=0.8.0 -Dpackaging=jar 

选择一个更复杂的groupId,这些是定义依赖项时将在pom中使用的.

Pick a more sophisticated groupId is you want, these are what you'll use in your pom when defining the dependency.

设置JBoss存储库时是否遇到某些特定问题?我前一阵子只是在pom的末尾添加了它:

Was there some specific issue you ran into when setting up the JBoss repo? I did it a while ago by just adding this at the end of a pom:

<repositories>
 <repository>
  <id>jboss</id>
  <url>http://repository.jboss.com/maven2</url>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>false</enabled>
  </snapshots>
</repository>
<repository>
  <id>jboss-snapshot</id>
  <url>http://snapshots.jboss.org/maven2</url>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>

这篇关于常春藤对外部JAR的依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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