gpt4 book ai didi

maven - 在当前项目和插件组中找不到前缀 'sonar' 的插件错误

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

直到昨天,Jenkins 和 Sonar(使用 Maven)一切正常。突然,我在 Jenkins 日志中看到了以下错误,并且所有项目的构建都失败了,并且出现了相同的错误。

[ERROR] No plugin found for prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/user/mysys/.m2/repository), nexus (http://localhost:8081/nexus/content/groups/public)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/user/mysys/.m2/repository), nexus (http://localhost:8081/nexus/content/groups/public)]
at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:94)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:262)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:222)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)

我在 Jenkins 中安装了 Sonar 和 Sonar 插件。

可能是什么问题。任何人都可以在这方面帮助我。

最佳答案

从今天早上起我就遇到了同样的问题。我没有对我的 conf 做任何更改。我在 Jenkins 上找到了一个解决方案:管理 Jenkins -> 配置系统 -> Sonar -> 高级 -> sonar-maven-plugin 的版本,我把 2.1 和我所有的项目现在都工作正常,很奇怪......

关于maven - 在当前项目和插件组中找不到前缀 'sonar' 的插件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18758198/

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