問題:我試圖讓谷歌協議緩衝區依賴關係工作。但沒有結果。 Maven不能拉任何協議緩衝區的依賴關係。Maven ArtifactNotFoundException疑難解答
Question1:據我所知,這個依賴在標準的maven倉庫中是不存在的,所以我只需要指出一些額外的倉庫。 我對不對?
問題2:如果回答第一個問題是,不是我怎麼能獲得額外的存儲庫的網址是什麼?Here是對maven依賴關係的引用。
錯誤:
[ERROR] Plugin com.google.protobuf.tools:maven-protoc-plugin:0.3.2 or one of its dependencies could not be resolved: Failure to find com.google.protobuf.to
ols:maven-protoc-plugin:jar:0.3.2 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the u
pdate interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin com.google.protobuf.tools:maven-protoc-plugin:0.3.2 or one of its dependencies could not be resol
ved: Failure to find com.google.protobuf.tools:maven-protoc-plugin:jar:0.3.2 in http://repo.maven.apache.org/maven2 was cached in the local repository, res
olution will not be reattempted until the update interval of central has elapsed or updates are forced
.......
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find com.google.protobuf.tools:maven-protoc-plugin:jar:0.3.2 in http://rep
o.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or update
s are forced
的pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>JavaSockets</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.5.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.google.protobuf.tools</groupId>
<artifactId>maven-protoc-plugin</artifactId>
<version>0.3.2</version>
<configuration>
<protocExecutable>C:\Users\Clasik\Desktop\Java Sockets</protocExecutable>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
......
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find com.google.protobuf.tools:maven-protoc-plugin:jar:0.3.2 in http://repo.ma
ven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates ar
e forced
...............
HTTP這個插件庫以獲得版本0.3.2://計算器.com/questions/17841931/maven-protoc-plugin-configuration-in-pom-xml-incorrect –
@FlorescentTicker他們沒有提供如何用maven解決這個問題的答案。他們只是建議手動下載插件。此外,我已經解決了這個問題 –