Intellij Idea 无法识别网络中 jar 内的 类
IntellijIdea doesn't recognize classes inside a jar in network
在我的 pom.xml 文件中,我想添加网络中的依赖项,所以我做了以下操作:
<properties>
<rai.home>\iis\runner</rai.home>
</properties>
<dependency>
<groupId>com.rai.utilities</groupId>
<artifactId>rai-utilities</artifactId>
<version>4.0</version>
<scope>system</scope>
<systemPath>${rai.home}/jar/rai-utilities-4.0-SNAPSHOT.jar</systemPath>
</dependency>
当我 运行 mvn clean install 这工作正常,但 IntellijIdea 无法在那个 jar 中找到 类,我得到一个错误:java.package ... does not exist
如果我更改路径并在我的本地机器上使用相同的 jar,如下所示:
<systemPath>D:/jar/rai-utilities-4.0-SNAPSHOT.jar</systemPath>
IntellijIdea 识别这个罐子里的 类。
我该如何解决这个问题?
IntelliJ IDEA has no support for the UNC paths 在依赖项中,您可以使用映射驱动器作为解决方法,并通过映射驱动器号引用文件。
在我的 pom.xml 文件中,我想添加网络中的依赖项,所以我做了以下操作:
<properties>
<rai.home>\iis\runner</rai.home>
</properties>
<dependency>
<groupId>com.rai.utilities</groupId>
<artifactId>rai-utilities</artifactId>
<version>4.0</version>
<scope>system</scope>
<systemPath>${rai.home}/jar/rai-utilities-4.0-SNAPSHOT.jar</systemPath>
</dependency>
当我 运行 mvn clean install 这工作正常,但 IntellijIdea 无法在那个 jar 中找到 类,我得到一个错误:java.package ... does not exist
如果我更改路径并在我的本地机器上使用相同的 jar,如下所示:
<systemPath>D:/jar/rai-utilities-4.0-SNAPSHOT.jar</systemPath>
IntellijIdea 识别这个罐子里的 类。
我该如何解决这个问题?
IntelliJ IDEA has no support for the UNC paths 在依赖项中,您可以使用映射驱动器作为解决方法,并通过映射驱动器号引用文件。