【发布时间】:2020-03-10 11:46:46
【问题描述】:
我正在尝试下载 protobuf-socket-rpc 存储库,以便我可以使用类似的类
com.googlecode.protobuf.socketrpc.RpcConnectionFactory;
在java中。我的 Maven 文件如下所示:
<?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>com.example</groupId>
<artifactId>GroovyExample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MMAMatcherGroovyTest</name>
<dependencies>
<dependency>
<groupId>com.googlecode.protobuf.socketrpc</groupId>
<artifactId>protobuf_socketrpc</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
</project>
然而,mvn install 命令首先返回一个警告:
[WARNING] The POM for com.googlecode.protobuf.socketrpc:protobuf_socketrpc:jar:1.3.2
is missing, no dependency information available
后来出现错误
[ERROR] Failed to execute goal on project GroovyExample: Could not resolve dependencies for
project com.example:GroovyExample:jar:0.0.1-SNAPSHOT: Failure to find
com.googlecode.protobuf.socketrpc:protobuf_socketrpc:jar:1.3.2 in
http://maven2:8081/repository/neurotechnology/ was cached in the local repository,
resolution will not be reattempted until the update interval of neurotec has elapsed
or updates are forced
我在一家公司工作,maven 首先尝试从我们的本地数据库下载存储库。 如何更新pom.xml 文件以使maven 也可以下载protobuf-socket-rpc 存储库?
【问题讨论】: