我正在努力恢复我的旧计划。我想为此使用maven,并添加AbsoluteLayout依赖项。我在maven是个新手,所以我不知道出了什么问题。我发现这样做是可行的:
<dependency>
<groupId>org.netbeans.external</groupId>
<artifactId>AbsoluteLayout</artifactId>
<version>RELEASE802</version>
</dependency>但我只知道这个错误:
Failed to execute goal on project XXX: Could not resolve dependencies for project xx.xxxx:XXX:jar:1.0-SNAPSHOT: Failure to find org.netbeans.external:AbsoluteLayout:jar:RELEASE802 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]在此之后,我从计算机中的netbeans文件夹手动添加了此依赖项。而且起作用了。还有其他方法可以添加此依赖项吗?我想把它包括在我的pom文件中。有什么想法吗?
发布于 2017-03-20 18:17:36
您需要将Netbeans存储库添加到POM中:
<repositories>
<repository>
<id>netbeans</id>
<name>Netbeans rep</name>
<url>http://bits.netbeans.org/maven2/</url>
</repository>
</repositories>发布于 2017-03-20 17:16:05
我将下面的依赖项块添加到POM中,在更新maven索引之后,它运行得很好。
<!-- https://mvnrepository.com/artifact/org.netbeans.external/AbsoluteLayout -->
<dependency>
<groupId>org.netbeans.external</groupId>
<artifactId>AbsoluteLayout</artifactId>
<version>RELEASE802</version>
</dependency>因此,您可能需要尝试更新您的maven索引,并查看它是否适合您。这个依赖块直接来自mvnpository.com/,并且工作时不需要我添加任何特殊的回购(据我所知)。
发布于 2017-03-20 16:49:21
看起来这种依赖在公共存储库中是不存在的,您可以注册一个帐户并上传它,或者,从我的观点来看,您可以设置您自己的私有maven存储库服务器,有很多软件支持这样做,例如JFrog Artifactory,安装和操作很容易。
https://stackoverflow.com/questions/42909316
复制相似问题