gpt4 book ai didi

java - Maven 插件 - 在存储库中搜索 net.abc 并且应该搜索 net/abc

转载 作者:太空宇宙 更新时间:2023-11-04 13:16:25 25 4
gpt4 key购买 nike

我在 POM 中定义了一个 Maven 插件:

<plugin>
<groupId>net.abc</groupId>
<artifactId>abc-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>

当我运行 mvn 时,我收到以下消息:

[WARNING] repository metadata for: '...' could not be retrieved from repository...

Error transferring file: Server returned HTTP response code: 503 for URL: http://10.1.1.102/net.abc/poms/maven-metadata.xml

当我将网络浏览器指向 http://10.1.1.102/ 时,该文件存在于 http://10.1.1.102/net/abc ,不是http://10.1.1.102/net.abc

如何指定 gorupId 以便它搜索正确的目录?

编辑:

根据要求,这是整个错误:

[WARNING] repository metadata for: 'snapshot net.abc:abc-maven-plugin:1.0-SNAPSHOT' could not be retrieved from repository: DEV2016 due to an error: Error transferring file: Server returned HTTP response code: 503 for URL: http://10.1.1.102/net.abc/poms/maven-metadata.xml
[INFO] Repository 'DEV2016' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository

Try downloading the file manually from the project website.

最佳答案

参见POM Reference, Maven Coordinates关于存储库路径:

  • groupId: ... When stored within a repository, the group acts much like the Java packaging structure does in an operating system. The dots are replaced by OS specific directory separators (such as '/' in Unix) which becomes a relative directory structure from the base repository. In the example given, the org.codehaus.mojo group lives within the directory $M2_REPO/org/codehaus/mojo.

关于java - Maven 插件 - 在存储库中搜索 net.abc 并且应该搜索 net/abc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33482793/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com