Ivy 没有安装一些 JAR

发布于 2024-11-13 03:06:17 字数 11031 浏览 1 评论 0原文

我正在使用 Ivy 进行项目依赖管理,除了我一直遇到的一个问题之外,它一直运行良好。 Ivy 正在下载某些依赖项,但它没有将它们安装到我的项目中。例如,log4j.jar 没有被放入项目的 lib 文件夹中,即使它被列为依赖项并且已成功下载。这是我的解析的输出:

ivy-resolve:
[ivy:configure] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = C:\...\...\...\...\ivysettings.xml
 [ivy:resolve] :: resolving dependencies :: com.gdi#gdi-core;0.0.1.SNAPSHOT
 [ivy:resolve]  confs: [default]
 [ivy:resolve]  found org.apache.axis#axis;1.4 in archiva.internal
 [ivy:resolve]  found org.apache.axis#axis-jaxrpc;1.4 in archiva.internal
 [ivy:resolve]  found org.apache.axis#axis-saaj;1.4 in archiva.internal
 [ivy:resolve]  found wsdl4j#wsdl4j;1.6.2 in archiva.internal
 [ivy:resolve]  found org.slf4j#slf4j-log4j12;1.6.1 in archiva.internal
 [ivy:resolve]  found org.slf4j#slf4j-api;1.6.1 in archiva.internal
 [ivy:resolve]  found log4j#log4j;1.2.16 in archiva.internal
 [ivy:resolve]  found log4j#apache-log4j-extras;1.1 in archiva.internal
 [ivy:resolve]  found org.apache.commons#commons-email;1.1 in archiva.internal
 [ivy:resolve]  found javax.mail#mail;1.4 in archiva.internal
 [ivy:resolve]  found javax.activation#activation;1.1 in archiva.internal
 [ivy:resolve]  found commons-discovery#commons-discovery;0.4 in archiva.internal
 [ivy:resolve]  found commons-logging#commons-logging;1.1 in archiva.internal
 [ivy:resolve]  found logkit#logkit;1.0.1 in archiva.internal
 [ivy:resolve]  found avalon-framework#avalon-framework;4.1.3 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-core;3.6.3.Final in archiva.internal
 [ivy:resolve]  found antlr#antlr;2.7.6 in archiva.internal
 [ivy:resolve]  found commons-collections#commons-collections;3.1 in archiva.internal
 [ivy:resolve]  found dom4j#dom4j;1.6.1 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-commons-annotations;3.2.0.Final in archiva.internal
 [ivy:resolve]  found org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.0.Final in archiva.internal
 [ivy:resolve]  found javax.transaction#jta;1.1 in archiva.internal
 [ivy:resolve]  found javax.validation#validation-api;1.0.0.GA in archiva.internal
 [ivy:resolve]  found ant#ant;1.6.5 in archiva.internal
 [ivy:resolve]  found javassist#javassist;3.12.0.GA in archiva.internal
 [ivy:resolve]  found cglib#cglib;2.2 in archiva.internal
 [ivy:resolve]  found asm#asm;3.1 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-validator;4.1.0 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-ehcache;3.6.3.Final in archiva.internal
 [ivy:resolve]  found net.sf.ehcache#ehcache-core;2.4.1 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-entitymanager;3.6.3.Final in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-search;3.4.0.Final in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-search-analyzers;3.4.0.Final in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-core;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-analyzers;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-analysis-extras;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-core;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-solrj;3.1.0 in archiva.internal
 [ivy:resolve]  found commons-io#commons-io;1.4 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-highlighter;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-memory;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-misc;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-spatial;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-spellchecker;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-commons-csv;3.1.0 in archiva.internal
 [ivy:resolve]  found commons-codec#commons-codec;1.4 in archiva.internal
 [ivy:resolve]  found commons-lang#commons-lang;2.4 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-smartcn;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-stempel;3.1.0 in archiva.internal
 [ivy:resolve]  found javax.jms#jms;1.1 in archiva.internal
 [ivy:resolve]  found javax.annotation#jsr250-api;1.0 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-search-infinispan;3.4.0.Final in archiva.internal
 [ivy:resolve]  found org.infinispan#infinispan-lucene-directory;4.2.1.FINAL in archiva.internal
 [ivy:resolve]  found org.infinispan#infinispan-core;4.2.1.FINAL in archiva.internal
 [ivy:resolve]  found org.jgroups#jgroups;2.12.0.Final in archiva.internal
 [ivy:resolve]  found org.jboss.javaee#jboss-transaction-api;1.0.1.GA in archiva.internal
 [ivy:resolve]  found org.jboss.marshalling#river;1.2.3.GA in archiva.internal
 [ivy:resolve]  found org.jboss.marshalling#marshalling-api;1.2.3.GA in archiva.internal
 [ivy:resolve]  found org.rhq.helpers#rhq-pluginAnnotations;3.0.1 in archiva.internal
 [ivy:resolve]  found i18nlog#i18nlog;1.0.10 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-c3p0;3.6.3.Final in archiva.internal
 [ivy:resolve]  found c3p0#c3p0;0.9.1 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-queries;3.1.0 in archiva.internal
 [ivy:resolve]  found jakarta-regexp#jakarta-regexp;1.4 in archiva.internal
 [ivy:resolve]  found postgresql#postgresql;9.0-801.jdbc4 in archiva.internal
 [ivy:resolve]  found org.drools#drools-jsr94;5.1.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-core;5.1.1 in archiva.internal
 [ivy:resolve]  found org.mvel#mvel2;2.0.16 in archiva.internal
 [ivy:resolve]  found org.drools#drools-api;5.1.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-compiler;5.1.1 in archiva.internal
 [ivy:resolve]  found org.antlr#antlr-runtime;3.1.3 in archiva.internal
 [ivy:resolve]  found org.eclipse.jdt.core.compiler#ecj;3.5.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-decisiontables;5.1.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-templates;5.1.1 in archiva.internal
 [ivy:resolve]  found net.sourceforge.jexcelapi#jxl;2.6.10 in archiva.internal
 [ivy:resolve]  found jsr94#jsr94;1.1 in archiva.internal
 [ivy:resolve]  found javax.xml.bind#jaxb-api;2.2.1 in archiva.internal
 [ivy:resolve]  found javax.xml.stream#stax-api;1.0-2 in archiva.internal
 [ivy:resolve] :: resolution report :: resolve 3414ms :: artifacts dl 98ms
 [ivy:resolve]  :: evicted modules:
 [ivy:resolve]  commons-logging#commons-logging;1.0.4 by [commons-logging#commons-logging;1.1] in [default]
 [ivy:resolve]  log4j#log4j;1.2.12 by [log4j#log4j;1.2.16] in [default]
 [ivy:resolve]  org.slf4j#slf4j-api;1.5.5 by [org.slf4j#slf4j-api;1.6.1] in [default]
 [ivy:resolve]  log4j#log4j;1.2.14 by [log4j#log4j;1.2.16] in [default]
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   82  |   0   |   0   |   4   ||  101  |   0   |
    ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: com.gdi#gdi-core [sync]
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  0 artifacts copied, 73 already retrieved (0kB/45ms)
BUILD SUCCESSFUL
Total time: 5 seconds

文件 log4j.jar、infinispan-core-4.2.1.FINAL.jar 和 apache-log4j-extras-1.1 没有像其他文件一样添加到我的 lib 目录中,我必须手动添加它们。不确定是什么原因导致此问题或如何修复它。任何帮助将不胜感激。

这是带有依赖项的 ivy.xml 文件。 Log4j 是 slf4j-log4j12 的依赖项,infinispan 是 hibernate-search-infinispan 的依赖项。 log4j extras 是我的项目的依赖项。

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module
   version="2.0"
   xmlns:m="http://ant.apache.org/ivy/maven"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
   <info
      organisation="com.gdi"
      module="gdi-core"
      revision="0.0.1.SNAPSHOT" />
   <dependencies>
      <dependency
         org="org.apache.axis"
         name="axis"
         rev="1.4" />
      <dependency
         org="org.apache.axis"
         name="axis-jaxrpc"
         rev="1.4" />
      <dependency
         org="org.apache.axis"
         name="axis-saaj"
         rev="1.4" />
      <dependency
         org="wsdl4j"
         name="wsdl4j"
         rev="1.6.2" />
      <dependency
         org="org.slf4j"
         name="slf4j-log4j12"
         rev="1.6.1" />
      <dependency
         org="log4j"
         name="apache-log4j-extras"
         rev="1.1" />
      <dependency
         org="org.apache.commons"
         name="commons-email"
         rev="1.1" />
      <dependency
         org="commons-discovery"
         name="commons-discovery"
         rev="0.4">
         <exclude
            module="servlet-api" />
      </dependency>
      <dependency
         org="commons-logging"
         name="commons-logging"
         rev="1.1">
         <exclude
            module="servlet-api" />
      </dependency>
      <dependency
         org="org.hibernate"
         name="hibernate-core"
         rev="3.6.3.Final">
         <exclude
            module="jboss-jacc-api_JDK4" />
      </dependency>
      <dependency
         org="org.hibernate"
         name="hibernate-validator"
         rev="4.1.0" />
      <dependency
         org="org.hibernate"
         name="hibernate-ehcache"
         rev="3.6.3.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-entitymanager"
         rev="3.6.3.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-search"
         rev="3.4.0.Final">
         <exclude
            module="jgroups" />
      </dependency>
      <dependency
         org="org.hibernate"
         name="hibernate-search-infinispan"
         rev="3.4.0.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-c3p0"
         rev="3.6.3.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-commons-annotations"
         rev="3.2.0.Final" />
      <dependency
         org="org.apache.lucene"
         name="lucene-queries"
         rev="3.1.0" />
      <dependency
         org="postgresql"
         name="postgresql"
         rev="9.0-801.jdbc4" />
      <dependency
         org="org.drools"
         name="drools-jsr94"
         rev="5.1.1" />
   </dependencies>
</ivy-module>

更新:

似乎未下载的库是“捆绑包”......

 [ivy:resolve]  [NOT REQUIRED] org.slf4j#slf4j-api;1.6.1!slf4j-api.jar
 [ivy:resolve]  [NOT REQUIRED] log4j#log4j;1.2.16!log4j.jar(bundle)
 [ivy:resolve]  [NOT REQUIRED] javax.mail#mail;1.4!mail.jar

I'm using Ivy for project dependency management and it's been working well aside from one issue which I've always had. There are certain dependencies that Ivy is downloading but it's not installing them into my project. For example, log4j.jar is not being put in the project's lib folder even though it's listed as a dependency and is being downloaded successfully. Here's the output from my resolve:

ivy-resolve:
[ivy:configure] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = C:\...\...\...\...\ivysettings.xml
 [ivy:resolve] :: resolving dependencies :: com.gdi#gdi-core;0.0.1.SNAPSHOT
 [ivy:resolve]  confs: [default]
 [ivy:resolve]  found org.apache.axis#axis;1.4 in archiva.internal
 [ivy:resolve]  found org.apache.axis#axis-jaxrpc;1.4 in archiva.internal
 [ivy:resolve]  found org.apache.axis#axis-saaj;1.4 in archiva.internal
 [ivy:resolve]  found wsdl4j#wsdl4j;1.6.2 in archiva.internal
 [ivy:resolve]  found org.slf4j#slf4j-log4j12;1.6.1 in archiva.internal
 [ivy:resolve]  found org.slf4j#slf4j-api;1.6.1 in archiva.internal
 [ivy:resolve]  found log4j#log4j;1.2.16 in archiva.internal
 [ivy:resolve]  found log4j#apache-log4j-extras;1.1 in archiva.internal
 [ivy:resolve]  found org.apache.commons#commons-email;1.1 in archiva.internal
 [ivy:resolve]  found javax.mail#mail;1.4 in archiva.internal
 [ivy:resolve]  found javax.activation#activation;1.1 in archiva.internal
 [ivy:resolve]  found commons-discovery#commons-discovery;0.4 in archiva.internal
 [ivy:resolve]  found commons-logging#commons-logging;1.1 in archiva.internal
 [ivy:resolve]  found logkit#logkit;1.0.1 in archiva.internal
 [ivy:resolve]  found avalon-framework#avalon-framework;4.1.3 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-core;3.6.3.Final in archiva.internal
 [ivy:resolve]  found antlr#antlr;2.7.6 in archiva.internal
 [ivy:resolve]  found commons-collections#commons-collections;3.1 in archiva.internal
 [ivy:resolve]  found dom4j#dom4j;1.6.1 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-commons-annotations;3.2.0.Final in archiva.internal
 [ivy:resolve]  found org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.0.Final in archiva.internal
 [ivy:resolve]  found javax.transaction#jta;1.1 in archiva.internal
 [ivy:resolve]  found javax.validation#validation-api;1.0.0.GA in archiva.internal
 [ivy:resolve]  found ant#ant;1.6.5 in archiva.internal
 [ivy:resolve]  found javassist#javassist;3.12.0.GA in archiva.internal
 [ivy:resolve]  found cglib#cglib;2.2 in archiva.internal
 [ivy:resolve]  found asm#asm;3.1 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-validator;4.1.0 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-ehcache;3.6.3.Final in archiva.internal
 [ivy:resolve]  found net.sf.ehcache#ehcache-core;2.4.1 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-entitymanager;3.6.3.Final in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-search;3.4.0.Final in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-search-analyzers;3.4.0.Final in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-core;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-analyzers;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-analysis-extras;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-core;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-solrj;3.1.0 in archiva.internal
 [ivy:resolve]  found commons-io#commons-io;1.4 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-highlighter;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-memory;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-misc;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-spatial;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-spellchecker;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.solr#solr-commons-csv;3.1.0 in archiva.internal
 [ivy:resolve]  found commons-codec#commons-codec;1.4 in archiva.internal
 [ivy:resolve]  found commons-lang#commons-lang;2.4 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-smartcn;3.1.0 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-stempel;3.1.0 in archiva.internal
 [ivy:resolve]  found javax.jms#jms;1.1 in archiva.internal
 [ivy:resolve]  found javax.annotation#jsr250-api;1.0 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-search-infinispan;3.4.0.Final in archiva.internal
 [ivy:resolve]  found org.infinispan#infinispan-lucene-directory;4.2.1.FINAL in archiva.internal
 [ivy:resolve]  found org.infinispan#infinispan-core;4.2.1.FINAL in archiva.internal
 [ivy:resolve]  found org.jgroups#jgroups;2.12.0.Final in archiva.internal
 [ivy:resolve]  found org.jboss.javaee#jboss-transaction-api;1.0.1.GA in archiva.internal
 [ivy:resolve]  found org.jboss.marshalling#river;1.2.3.GA in archiva.internal
 [ivy:resolve]  found org.jboss.marshalling#marshalling-api;1.2.3.GA in archiva.internal
 [ivy:resolve]  found org.rhq.helpers#rhq-pluginAnnotations;3.0.1 in archiva.internal
 [ivy:resolve]  found i18nlog#i18nlog;1.0.10 in archiva.internal
 [ivy:resolve]  found org.hibernate#hibernate-c3p0;3.6.3.Final in archiva.internal
 [ivy:resolve]  found c3p0#c3p0;0.9.1 in archiva.internal
 [ivy:resolve]  found org.apache.lucene#lucene-queries;3.1.0 in archiva.internal
 [ivy:resolve]  found jakarta-regexp#jakarta-regexp;1.4 in archiva.internal
 [ivy:resolve]  found postgresql#postgresql;9.0-801.jdbc4 in archiva.internal
 [ivy:resolve]  found org.drools#drools-jsr94;5.1.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-core;5.1.1 in archiva.internal
 [ivy:resolve]  found org.mvel#mvel2;2.0.16 in archiva.internal
 [ivy:resolve]  found org.drools#drools-api;5.1.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-compiler;5.1.1 in archiva.internal
 [ivy:resolve]  found org.antlr#antlr-runtime;3.1.3 in archiva.internal
 [ivy:resolve]  found org.eclipse.jdt.core.compiler#ecj;3.5.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-decisiontables;5.1.1 in archiva.internal
 [ivy:resolve]  found org.drools#drools-templates;5.1.1 in archiva.internal
 [ivy:resolve]  found net.sourceforge.jexcelapi#jxl;2.6.10 in archiva.internal
 [ivy:resolve]  found jsr94#jsr94;1.1 in archiva.internal
 [ivy:resolve]  found javax.xml.bind#jaxb-api;2.2.1 in archiva.internal
 [ivy:resolve]  found javax.xml.stream#stax-api;1.0-2 in archiva.internal
 [ivy:resolve] :: resolution report :: resolve 3414ms :: artifacts dl 98ms
 [ivy:resolve]  :: evicted modules:
 [ivy:resolve]  commons-logging#commons-logging;1.0.4 by [commons-logging#commons-logging;1.1] in [default]
 [ivy:resolve]  log4j#log4j;1.2.12 by [log4j#log4j;1.2.16] in [default]
 [ivy:resolve]  org.slf4j#slf4j-api;1.5.5 by [org.slf4j#slf4j-api;1.6.1] in [default]
 [ivy:resolve]  log4j#log4j;1.2.14 by [log4j#log4j;1.2.16] in [default]
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   82  |   0   |   0   |   4   ||  101  |   0   |
    ---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: com.gdi#gdi-core [sync]
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  0 artifacts copied, 73 already retrieved (0kB/45ms)
BUILD SUCCESSFUL
Total time: 5 seconds

The files log4j.jar, infinispan-core-4.2.1.FINAL.jar, and apache-log4j-extras-1.1 are not added to my lib directory like the others and I have to add them manually. Not sure what's causing this or how to fix it. Any help would be appreciated.

Here's the ivy.xml file with the dependencies. Log4j is a dependency of slf4j-log4j12 and infinispan is a dependency of hibernate-search-infinispan. log4j extras is a dependency of my project.

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module
   version="2.0"
   xmlns:m="http://ant.apache.org/ivy/maven"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
   <info
      organisation="com.gdi"
      module="gdi-core"
      revision="0.0.1.SNAPSHOT" />
   <dependencies>
      <dependency
         org="org.apache.axis"
         name="axis"
         rev="1.4" />
      <dependency
         org="org.apache.axis"
         name="axis-jaxrpc"
         rev="1.4" />
      <dependency
         org="org.apache.axis"
         name="axis-saaj"
         rev="1.4" />
      <dependency
         org="wsdl4j"
         name="wsdl4j"
         rev="1.6.2" />
      <dependency
         org="org.slf4j"
         name="slf4j-log4j12"
         rev="1.6.1" />
      <dependency
         org="log4j"
         name="apache-log4j-extras"
         rev="1.1" />
      <dependency
         org="org.apache.commons"
         name="commons-email"
         rev="1.1" />
      <dependency
         org="commons-discovery"
         name="commons-discovery"
         rev="0.4">
         <exclude
            module="servlet-api" />
      </dependency>
      <dependency
         org="commons-logging"
         name="commons-logging"
         rev="1.1">
         <exclude
            module="servlet-api" />
      </dependency>
      <dependency
         org="org.hibernate"
         name="hibernate-core"
         rev="3.6.3.Final">
         <exclude
            module="jboss-jacc-api_JDK4" />
      </dependency>
      <dependency
         org="org.hibernate"
         name="hibernate-validator"
         rev="4.1.0" />
      <dependency
         org="org.hibernate"
         name="hibernate-ehcache"
         rev="3.6.3.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-entitymanager"
         rev="3.6.3.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-search"
         rev="3.4.0.Final">
         <exclude
            module="jgroups" />
      </dependency>
      <dependency
         org="org.hibernate"
         name="hibernate-search-infinispan"
         rev="3.4.0.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-c3p0"
         rev="3.6.3.Final" />
      <dependency
         org="org.hibernate"
         name="hibernate-commons-annotations"
         rev="3.2.0.Final" />
      <dependency
         org="org.apache.lucene"
         name="lucene-queries"
         rev="3.1.0" />
      <dependency
         org="postgresql"
         name="postgresql"
         rev="9.0-801.jdbc4" />
      <dependency
         org="org.drools"
         name="drools-jsr94"
         rev="5.1.1" />
   </dependencies>
</ivy-module>

Update:

Seems like the libraries not being downloaded are "Bundles" ...

 [ivy:resolve]  [NOT REQUIRED] org.slf4j#slf4j-api;1.6.1!slf4j-api.jar
 [ivy:resolve]  [NOT REQUIRED] log4j#log4j;1.2.16!log4j.jar(bundle)
 [ivy:resolve]  [NOT REQUIRED] javax.mail#mail;1.4!mail.jar

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

清旖 2024-11-20 03:06:17

发现问题了。问题是缺少的依赖项是“bundle”,而我的 ant 脚本设置为仅安装“jar”...

<ivy:retrieve pattern="${ivy.lib.dir}/[artifact].[revision].[ext]"
                type="jar"
                sync="true" />

修复版本:

<ivy:retrieve pattern="${ivy.lib.dir}/[artifact].[revision].[ext]"
                type="jar,bundle"
                sync="true" />

Found the issue. The problem was that the missing dependencies were "bundle" and my ant script was set to only install "jar" ...

<ivy:retrieve pattern="${ivy.lib.dir}/[artifact].[revision].[ext]"
                type="jar"
                sync="true" />

Fixed version:

<ivy:retrieve pattern="${ivy.lib.dir}/[artifact].[revision].[ext]"
                type="jar,bundle"
                sync="true" />
野心澎湃 2024-11-20 03:06:17

尝试将 conf 映射的左侧设置为默认值。例如 conf="runtime->default" 这解决了我的问题。

编辑:这可以在 ivy.xml 的 标记中找到。例如:

<dependencies>
    <dependency conf="runtime->default" name="jsf-api" org="com.sun.faces" rev="2.2.13"/>   
</dependencies>

->default 部分是关键。

Try setting the left side of conf mapping to default. For example conf="runtime->default" That resolved my issue.

Edit: This can be found in ivy.xml, in the <dependency> tag. For eg:

<dependencies>
    <dependency conf="runtime->default" name="jsf-api" org="com.sun.faces" rev="2.2.13"/>   
</dependencies>

The part ->default is the key.

澜川若宁 2024-11-20 03:06:17

您应该验证用于那些丢失的 jar 的 conf 映射。特别是,如果您有 log4j 的 conf,例如 compile,它实际上不会检索任何内容,因为 log4j 是使用 conf 发布的masterr。您需要将 conf 设置为 compile->master 之类的内容。然后,您需要对丢失的其他工件进行重复。

You should verify the conf mapping you're using for those missing jars. In particular, if you have a conf of, say, compile for log4j it won't actually retrieve anything because log4j is published with a conf of master. You'd need to set your conf to something like compile->master. You then need to repeat with the other artifacts that are missing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文