intellij没有从第三方存储库中找到maven导入 [英] intellij not finding maven imports from third party repository

查看:238
本文介绍了intellij没有从第三方存储库中找到maven导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的pom.xml包含

My pom.xml includes

    <repositories>
    <repository>
        <id>spantus</id>
        <name>spantus sourceforge</name>
        <url>http://spantus.sourceforge.net/maven/global/</url>
    </repository>
</repositories>

    <dependency>
        <groupId>net.sourceforge</groupId>
        <artifactId>javaml</artifactId>
        <version>0.1.5</version>
    </dependency>

我的代码包含行

    net.sf.javaml.core.Instance instance;

有错误


无法解析符号'net'

cannot resolve symbol 'net'

(同样,导入失败)。

然而mvn包工作正常,这表明它正在编译并找到依赖。此外,pom.xml在依赖项上没有显示错误。

Yet mvn package works fine, which indicates it's compiling and finding the dependency. Furthermore the pom.xml shows no error on the dependency.

我在0.1.5版本中手动导航源代码以确保导入的包名称是正确的。 (但是无论如何mvn编译它,所以无论如何)。

I've manually navigated the source in version 0.1.5 to make sure the package name for the import is correct. (But mvn compiles it anyway, so no matter).

我已经完成了使缓存无效并重新启动并且错误仍然存​​在。

I have done "invalidate cache and restart" and the error persists."

我怎样才能让intellij工作?

How can I get intellij to work?

推荐答案

包括这种依赖对我有用

<dependency>
    <groupId>net.sf</groupId>
    <artifactId>javaml</artifactId>
    <version>0.1.7</version>
</dependency>

没有设置任何存储库。

希望有所帮助

这篇关于intellij没有从第三方存储库中找到maven导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆