【问题标题】:Use local Ivy resolution with vendor jars对供应商 jar 使用本地 Ivy 分辨率
【发布时间】:2015-01-21 03:36:00
【问题描述】:

我有来自 IBM 的供应商 jar(4 个以 com.ibm.mq* 开头的 jar) 我正在尝试将它们发布到我的本地常春藤缓存以用于多个项目。

IVY.XML

<ivy-module version="2.0">
  <info organisation="com.ibm" module="com.ibm.mq" />
  <publications>
    <artifact name="com.ibm.mq" type="jar" ext="jar"/>
    <artifact name="com.ibm.mq" type="javadoc" ext="jar"/>
    <artifact name="com.ibm.mq" type="source" ext="jar"/>
    <artifact name="com.ibm.mq.commonservices" type="jar" ext="jar"/>
    <artifact name="com.ibm.mq.commonservices" type="javadoc" ext="jar"/>
    <artifact name="com.ibm.mq.commonservices" type="source" ext="jar"/>
    <artifact name="com.ibm.mq.headers" type="jar" ext="jar"/>
    <artifact name="com.ibm.mq.headers" type="javadoc" ext="jar"/>
    <artifact name="com.ibm.mq.headers" type="source" ext="jar"/>
    <artifact name="com.ibm.mq.jmqi" type="jar" ext="jar"/>
    <artifact name="com.ibm.mq.jmqi" type="javadoc" ext="jar"/>
    <artifact name="com.ibm.mq.jmqi" type="source" ext="jar"/>
  </publications>
  <dependencies>
  </dependencies>
</ivy-module>

我的罐子被命名为:

laptop: ls jars |  sed 's/^/    /' 
com.ibm.mq-7.5.0.2.jar
com.ibm.mq.commonservices-7.5.0.2.jar
com.ibm.mq.headers-7.5.0.2.jar
com.ibm.mq.jmqi-7.5.0.2.jar

但发布失败:

Buildfile: C:\Users\alan\Workspace-Eclipse\IBM-MQ\build.xml

publish:
[ivy:resolve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: url = jar:file:/C:/Users/alan/.ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:resolve] :: resolving dependencies :: com.ibm#com.ibm.mq;working@DTC26009BA481FC
[ivy:resolve]       confs: [default]
[ivy:resolve] :: resolution report :: resolve 52ms :: artifacts dl 0ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   0   |   0   |   0   |   0   ||   0   |   0   |
    ---------------------------------------------------------------------
[ivy:publish] :: publishing :: com.ibm#com.ibm.mq

BUILD FAILED
C:\Users\jurgenaw\Workspace-Eclipse\IBM-MQ\build.xml:4: impossible to publish artifacts for com.ibm#com.ibm.mq;working@DTC26009BA481FC: java.io.IOException: missing artifact com.ibm#mq;7.5.0.2!mq.jar
    at org.apache.ivy.core.publish.PublishEngine.publish(PublishEngine.java:225)

我的 build.xml 文件:

<project name="localrepository" default="publish" xmlns:ivy="antlib:org.apache.ivy.ant">
  <target name="publish" description="Publish ibm.mq jars into LOCAL repository">
    <ivy:resolve/>
    <ivy:publish pubrevision="7.5.0.2" status="release" resolver="local" overwrite="true" >
      <!-- artifacts pattern="[artifact]-[type].[ext]"/ -->
      <artifacts pattern="[type]s/[artifact]-[revision].[ext]" />
    </ivy:publish>
  </target>
  <target name="cleancache" description="removes home/user/.ivy2 !">
    <ivy:cleancache />
  </target>
  <target name="resolve" description="resolve">
    <ivy:resolve />
  </target>
  <target name="report" description="dependancy report">
    <ivy:report organisation="com.ibm" module="com.ibm.mq" />
  </target>
</project>

【问题讨论】:

  • 好的,在我删除 ivys 目录后它可以工作(它从之前的尝试中提取了一些部门!)
  • 只是一个注释。 IBM 许可证规定您必须安装 MQ(MC75 客户端 supportpac 或产品)并使用安装时从其目录中提供的库。你不允许移动它们。如果您有问题,IBM 也不支持您的配置。

标签: java ivy mq


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2017-12-29
    • 2010-10-19
    • 2013-01-19
    • 1970-01-01
    • 2012-10-30
    • 2017-01-25
    • 2016-01-18
    • 2013-05-07
    • 2012-02-10
    相关资源
    最近更新 更多