problem: No plugin found for prefix '.host.url=https'

4,658 views
Skip to first unread message

Noel Grandin

unread,
Feb 7, 2018, 3:12:41 AM2/7/18
to SonarQube
Hi

I'm getting the below error when trying to run the SonarCloud check, any ideas?

Thanks, Noel.

.\mvnw sonar:sonar -Dsonar.organization=h2database -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=<xxx>

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.057 s
[INFO] Finished at: 2018-02-07T10:06:34+02:00
[INFO] Final Memory: 11M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix '.host.url=https' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\noel\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix '.host.url=https' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\noel\.m2\repository), central (https://repo.maven.apache.org/maven2)]
        at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve(DefaultPluginPrefixResolver.java:93)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix(MojoDescriptorCreator.java:266)
        at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:220)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:103)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:83)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:89)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
        at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
        at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
PS C:\Users\noel\Documents\GitHub\h2database\h2>

Fabrice Bellingard

unread,
Feb 7, 2018, 11:02:37 AM2/7/18
to Noel Grandin, SonarQube
Hi Noel,

I tried running the same command on my side (i.e. w/ same CLI params that I copy-pasted) but using a locally installed "mvn", and it worked. So I suspect that something is not working correctly with your "mvnw" script (something like it's not correctly passing the CLI params to the "mvn" executable). 

Have you tried running the command with a locally installed "mvn" command?

Best regards,
Fabrice Bellingard | SonarSource
SonarQube & SonarCloud Product Manager
https://sonarsource.com

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/e28584d7-7f56-4e5f-af9a-784cdff7e3ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Noel Grandin

unread,
Feb 8, 2018, 3:38:14 AM2/8/18
to Fabrice Bellingard, SonarQube


On 2018/02/07 6:02 PM, Fabrice Bellingard wrote:
> Have you tried running the command with a locally installed "mvn" command?
>

Hmmm, I was trying to run mvnw.cmd under PowerShell, running mvnw (note the lack of extension) works. Probably some
weird interaction there, thanks for the pointer.

Now I'm getting

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on
project h2: You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the
SonarQube server. Please contact your SonarQube administrator. -> [Help 1]

Which is odd - I'm trying to run an analysis over the H2 (h2database.com) open source project, and I think I've followed
all the instructions correctly on sonarcloud.io ?

Fabrice Bellingard

unread,
Feb 8, 2018, 4:37:58 AM2/8/18
to Noel Grandin, SonarQube
Hi Noel,

You get this error because h2database has already been analysed by someone else: https://sonarcloud.io/dashboard?id=com.h2database%3Ah2

If you really want to analyse it in your own organization, you can force the SonarCloud key to be different using the "sonar.projectKey" property inside the POM file (when not set, it defaults to "groupId:artifactId" - which is why you get the same key as the other SonarCloud user who analysed this project first).


Best regards,
Fabrice Bellingard | SonarSource
SonarQube & SonarCloud Product Manager
https://sonarsource.com

Noel Grandin

unread,
Feb 9, 2018, 1:57:48 AM2/9/18
to Fabrice Bellingard, SonarQube
Thanks Fabrice, that works!​
Reply all
Reply to author
Forward
0 new messages