gpt4 book ai didi

maven - 无法读取我的本地主机 Nexus 存储库中存在的 Artifact 的 Artifact 描述符

转载 作者:行者123 更新时间:2023-12-04 23:54:39 30 4
gpt4 key购买 nike

所以我遇到了一个错误 Failed to read artifact descriptor对于已部署到我本地 Nexus 的插件。我检查了 Nexus 上的 pom。
这个插件依赖于 Maven 2.2.1 而我正在考虑 Maven 3.0.4。这可能是个问题吗?

<repositories>
<repository>
<id>public</id>
<url>http://localhost:8081/nexus/content/groups/public</url>
</repository>
</repositories>


[ERROR] Plugin com.atlassian.maven.plugins:maven-jgitflow-plugin:1.0-alpha21-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.atlassian.maven.plugins:maven-jgitflow-plugin:jar:1.0-alpha21-SNAPSHOT: Could not find artifact com.atlassian.maven.plugins:maven-jgitflow-plugin:pom:1.0-alpha21-SNAPSHOT -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin com.atlassian.maven.plugins:maven-jgitflow-plugin:1.0-alpha21-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.atlassian.maven.plugins:maven-jgitflow-plugin:jar:1.0-alpha21-SNAPSHOT
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:235)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:98)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.atlassian.maven.plugins:maven-jgitflow-plugin:jar:1.0-alpha21-SNAPSHOT
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:279)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:115)
... 20 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact com.atlassian.maven.plugins:maven-jgitflow-plugin:pom:1.0-alpha21-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
... 23 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact com.atlassian.maven.plugins:maven-jgitflow-plugin:pom:1.0-alpha21-SNAPSHOT
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:528)
... 26 more

最佳答案

啊发现问题了。我正在使用 <repositories>标签。使用 Maven 3 所以我需要添加 <pluginRepositories>标记到我的 pom 以获得这种依赖

<pluginRepositories>
<repository>
<id>public</id>
<url>http://localhost:8081/nexus/content/groups/public</url>
</repository>
</pluginRepositories>

关于maven - 无法读取我的本地主机 Nexus 存储库中存在的 Artifact 的 Artifact 描述符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18728792/

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