在Intellij Idea中找不到Maven依赖项'de.javakaffee:kryo-serializers:0.45'

时间:2019-08-04 13:14:32

标签: java maven

我像这样使用maven导入项目中的依赖项:

 <dependency>
     <groupId>de.javakaffee</groupId>
     <artifactId>kryo-serializers</artifactId>
     <version>0.45</version>
 </dependency>

但是该项目提供了此提示(文件网址:https://mvnrepository.com/artifact/de.javakaffee/kryo-serializers/0.45):

Dependency 'de.javakaffee:kryo-serializers:0.45' not found.

enter image description here

我已经尝试过了:

mvn clean install -e -U

然后reimoprt pom.xml。然后我换成另一个jar,就可以了。就像这样:

<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>1.2.58</version>
</dependency>

这是我的settings.xml配置:

<repositories>
        <repository>
            <id>central</id>
            <name>central repository</name>
            <url>https://repo1.maven.org/maven2</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
          <repository>
            <id>snapshots</id>
            <name>Snapshots</name>
            <snapshots>
              <enabled>true</enabled>
              <updatePolicy>never</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
            </snapshots>
            <url>https://nexus.myrepo.com/repository/maven-snapshots/</url>
          </repository>
          <repository>
            <id>releases</id>
            <name>Releases</name>
            <snapshots>
              <enabled>false</enabled>
            </snapshots>
            <url>https://nexus.myrepo.com/repository/maven-releases/</url>
          </repository>  
        </repositories>

问题是:为什么同一个仓库,有的jar导入成功,有的失败?哪里出了问题?

0 个答案:

没有答案