2016-06-21 37 views
-1

我更新版本依賴於pom.xml到:Maven的下載罐子但隨後報告「無法解析相關性」

<dependency> 
     <groupId>com.twelvemonkeys.imageio</groupId> 
     <artifactId>imageio</artifactId> 
     <version>3.2.1</version> 
    </dependency> 
    <dependency> 
     <groupId>com.twelvemonkeys.imageio</groupId> 
     <artifactId>imageio-jpeg</artifactId> 
     <version>3.2.1</version> 
    </dependency> 

當運行

 mvn package 

我們看到正在下載的新版本:

[INFO] ------------------------------------------------------------------------ 
Downloading: https://repository.apache.org/content/repositories/snapshots/com/twelvemonkeys/imageio/imageio-jpeg/3.2.1/imageio-jpeg-3.2.1.pom 
Downloading: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-jpeg/3.2.1/imageio-jpeg-3.2.1.pom 
Downloaded: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-jpeg/3.2.1/imageio-jpeg-3.2.1.pom (2 KB at 8.0 KB/sec) 
Downloading: https://repository.apache.org/content/repositories/snapshots/com/twelvemonkeys/imageio/imageio-core/3.2.1/imageio-core-3.2.1.pom 
Downloading: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-core/3.2.1/imageio-core-3.2.1.pom 
Downloaded: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-core/3.2.1/imageio-core-3.2.1.pom (1004 B at 22.3 KB/sec) 
Downloading: https://repository.apache.org/content/repositories/snapshots/com/twelvemonkeys/imageio/imageio-metadata/3.2.1/imageio-metadata-3.2.1.pom 
Downloading: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-metadata/3.2.1/imageio-metadata-3.2.1.pom 
Downloaded: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-metadata/3.2.1/imageio-metadata-3.2.1.pom (974 B at 20.7 KB/sec) 
Downloading: https://repository.apache.org/content/repositories/snapshots/com/twelvemonkeys/imageio/imageio-jpeg/3.2.1/imageio-jpeg-3.2.1.jar 
Downloading: https://repository.apache.org/content/repositories/snapshots/com/twelvemonkeys/imageio/imageio-core/3.2.1/imageio-core-3.2.1.jar 
Downloading: https://repository.apache.org/content/repositories/snapshots/com/twelvemonkeys/imageio/imageio-metadata/3.2.1/imageio-metadata-3.2.1.jar 
Downloading: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-jpeg/3.2.1/imageio-jpeg-3.2.1.jar 
Downloading: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-core/3.2.1/imageio-core-3.2.1.jar 
Downloading: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-metadata/3.2.1/imageio-metadata-3.2.1.jar 
Downloaded: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-jpeg/3.2.1/imageio-jpeg-3.2.1.jar (58 KB at 145.8 KB/sec) 
Downloaded: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-core/3.2.1/imageio-core-3.2.1.jar (64 KB at 152.0 KB/sec) 
Downloaded: https://repo.maven.apache.org/maven2/com/twelvemonkeys/imageio/imageio-metadata/3.2.1/imageio-metadata-3.2.1.jar (72 KB at 171.7 KB/sec) 

package目標仍然失敗.. 何時無法解決這些相同的依賴關係之一(imageio.jar:3.2.1)?

[INFO] --------------------------------------- --------------------------------- [INFO] BUILD FAILURE [INFO] -------- -------------------------------------------------- -------------- [INFO] Total time:2.911 s [INFO] Final Memory:17M/221M [INFO] --------------------------------------------- --------------------------- [錯誤]無法執行項目目標sparknet:無法解析項目org.amplab的依賴關係 :sparknet :jar:1.0:未能找到 com.twelvemonkeys.imageio:imageio:jar:3.2.1 in https://repository.apache.org/content/repositories/snapshots是 在本地倉庫緩存,分辨率不會重新嘗試 直到Maven的快照庫的更新間隔已過或 更新強制 - > [求助1] [錯誤]

回答

0

看來問題是3.1.23.2.1版本的imagio他們已經重組了他們的模塊。現在他們有imageio-core而不是imageio

所以..更新的pom.xml如下:

<dependency> <groupId>com.twelvemonkeys.imageio</groupId> <artifactId>imageio-core</artifactId> <version>3.2.1</version> </dependency>

(使用imageio-core代替imageio)似乎已經解決了。

0

你需要做的是用-U強制maven忽略本地存儲庫中的緩存構件並更新它們。 mvn package -U