簡體   English   中英

Maven依賴項僅下載pom而不是jar以獲得較新版本

[英]Maven dependency is downloading only pom not jar for newer version

我依賴於JBoss的teiid框架。 如果我添加對較舊版本的依賴關系,它將下載jar文件,而如果我添加對較新版本的依賴關系,則僅下載pom文件。 下面是我的pom配置

庫:

  <repository>
    <id>jboss-public-repository-group</id>
    <url>http://repository.jboss.org/nexus/content/groups/public/</url>
  </repository>

這將下載jar

<dependency>
    <groupId>org.jboss.teiid</groupId>
    <artifactId>teiid-client</artifactId>
    <version>8.5.0.Final</version>
</dependency>

這只會下載pom文件

<dependency>
    <groupId>org.jboss.teiid</groupId>
    <artifactId>teiid-client</artifactId>
    <version>8.9.1</version>
</dependency>

更新:Maven日志

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building hello-teiid 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jboss/teiid/teiid-client/8.9.1/teiid-client-8.9.1.pom
[INFO] Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/jboss/teiid/teiid-client/8.9.1/teiid-client-8.9.1.pom (2 KB at 1.4 KB/sec)
[INFO] Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jboss/as/jboss-as-parent/7.4.0.Final-redhat-4/jboss-as-parent-7.4.0.Final-redhat-4.pom
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/jboss/as/jboss-as-parent/7.4.0.Final-redhat-4/jboss-as-parent-7.4.0.Final-redhat-4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.047 s
[INFO] Finished at: 2015-01-28T09:41:17-05:00
[INFO] Final Memory: 6M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hello-teiid: Could not resolve dependencies for project hello:hello-teiid:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.jboss.teiid:teiid-client:jar:8.9.1: Failed to read artifact descriptor for org.jboss.teiid:teiid-client:jar:8.9.1: Could not find artifact org.jboss.as:jboss-as-parent:pom:7.4.0.Final-redhat-4 in jboss-public-repository-group (http://repository.jboss.org/nexus/content/groups/public/) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

如果在jboss存儲庫中搜索此工件,則可以看到在8.9.1版中其包裝為“ bundle” ,而在8.5.0版中則默認為“ jar”

現在我們已經注意到了這一點,我們可以將其與@AlexandrM的評論相關聯, OSGI Bundle與jar依賴關系

或更具體地說, 為什么Maven找不到osgi bundle依賴項? (請注意第二個答案,而不是公認的答案。 基本上,您需要添加一個定義它的插件,即maven-bundle-plugin )。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM