SonarQube 5.1.1 artifacts not deployed to Central

778 views
Skip to first unread message

guillau...@gmail.com

unread,
Jun 24, 2015, 6:20:31 AM6/24/15
to sona...@googlegroups.com

Hi SonarQube team,


(I posted this on stackoverflow but thought that this group might be more appropriate)


After upgrading to 5.1.1, I start to have the following errors:

Could not find artifact org.codehaus.sonar:sonar-maven3-plugin:jar:5.1.1 in nexus-maven-central


Looks like the 5.1.1 artifacts haven't been deployed to Central: http://search.maven.org/#search|gav|1|g%3A%22org.codehaus.sonar%22%20AND%20a%3A%22sonar-maven3-plugin%22


Looks like an oversight. Could you fix this?


Thanks!


--

Guillaume

Simon Brandhof

unread,
Jun 24, 2015, 9:27:02 AM6/24/15
to sona...@googlegroups.com, guillau...@gmail.com, guillau...@gmail.com
Hi,

This internal maven plugin is not supposed to be used. I suppose that a old version of org.codehaus.mojo:sonar-maven-plugin is used. Do you confirm ? Which version do you use ?

Thanks
 
 

Guillaume Smet

unread,
Jun 24, 2015, 10:12:21 AM6/24/15
to Simon Brandhof, sona...@googlegroups.com
Hi Simon,

I use the Jenkins plugin 2.2.1 which seems to use:
org.codehaus.mojo:sonar-maven-plugin:2.2:sonar

--
Guillaume

Simon Brandhof

unread,
Jun 24, 2015, 10:59:49 AM6/24/15
to sona...@googlegroups.com, guillau...@gmail.com, guillau...@gmail.com
The Jenkins plugin does not fix the mojo version, so 2.2 is probably defined in project pom or in jenkins job config (see "SonarQube installation" > Version of sonar-maven-plugin). Note that the usage of the internal maven plugin (which is not deployed in central for 5.1.1) was dropped in mojo 2.3 !

Guillaume Smet

unread,
Jun 24, 2015, 11:39:49 AM6/24/15
to Simon Brandhof, sona...@googlegroups.com
Oh yes, thanks, I set it to 2.2 a long time ago to fix an issue we had.

Problem fixed, sorry for the noise. The fact that the artifact was not shipped just for 5.1.1 misled me.

Is it normal that I have to manually define it to 2.6? Otherwise, if I let the field blank it uses 2.0.

Have a nice day!

Julien HENRY

unread,
Jun 25, 2015, 3:33:38 AM6/25/15
to sona...@googlegroups.com, guillau...@gmail.com, simon.b...@sonarsource.com, guillau...@gmail.com
Hi Guillaume,
 
Is it normal that I have to manually define it to 2.6? Otherwise, if I let the field blank it uses 2.0.

 This should be an issue in your Maven infrastructure. mvn sonar:sonar should be resolved to mvn org.codehaus.mojo:sonar-maven-plugin:RELEASE:sonar that in turn will be resolved using metadata.xml. If you are using Nexus maybe you have to ensure metadata are up to date (if I remember correctly there was an option to rebuild metadata).

> cat /home/julien/.m2/repository/org/codehaus/mojo/sonar-maven-plugin/maven-metadata-central.xml
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>sonar-maven-plugin</artifactId>
  <versioning>
    <latest>2.6</latest>
    <release>2.6</release>
    <versions>
      <version>1.0-beta-1</version>
      <version>1.0-beta-2</version>
      <version>1.0</version>
      <version>2.0-beta-1</version>
      <version>2.0-beta-2</version>
      <version>2.0</version>
      <version>2.1</version>
      <version>2.2</version>
      <version>2.3</version>
      <version>2.3.1</version>
      <version>2.4</version>
      <version>2.5</version>
      <version>2.6</version>
    </versions>
    <lastUpdated>20150427214506</lastUpdated>
  </versioning>
</metadata>

jmc...@excentia.es

unread,
Jul 28, 2015, 4:26:36 AM7/28/15
to SonarQube, guillau...@gmail.com, simon.b...@sonarsource.com, julien...@sonarsource.com
Hello.

I'm dealing with the same issue in my SonarQube 5.1.1 instance.

If I run mvn -U sonar:sonar following error appears:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project XXX: Can not execute SonarQube analysis: Plugin org.codehaus.sonar:sonar-maven3-plugin:5.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.sonar:sonar-maven3-plugin:jar:5.1.1: Failure to find org.codehaus.sonar:sonar-maven3-plugin:pom:5.1.1 in https://XXX/nexus/content/groups/XXX was cached in the local repository, resolution will not be reattempted until the update interval of XXX has elapsed or updates are forced -> [Help 1]

If I run mvn -U org.codehaus.mojo:sonar-maven-plugin:2.6:sonar everything works well.

If I run mvn -U sonar:sonar again, it tries to use org.codehaus.mojo:sonar-maven-plugin:2.1 again.

I've tried to use several Maven versions (3.0.5 and 3.2.5) obtaining the same results.
I've tried to remove org.codehaus.mojo:sonar-maven-plugin:2.1 artifact from my local repository, but org.codehaus.mojo:sonar-maven-plugin:2.1 is downloaded again by default.

Any suggestions?

Julien HENRY

unread,
Jul 28, 2015, 6:54:51 AM7/28/15
to SonarQube, jmc...@excentia.es, guillau...@gmail.com, simon.b...@sonarsource.com, jmc...@excentia.es
Hi,

Latest version of a plugin is resolved using Maven metadata. If you have an internal Maven repository proxy (like Nexus) I suggest you to check that metadata are not out of date.

Also in your local repo please check (and remove if necessary) ~/.m2/repository/org/codehaus/mojo/sonar-maven-plugin/*.xml

++

Julien

Ricardo García Fernández

unread,
Jul 29, 2015, 4:12:12 AM7/29/15
to Julien HENRY, SonarQube, José María Cubel, guillau...@gmail.com, simon.b...@sonarsource.com
Hi,

Try to configure to force updates of repository using maven configuration:

<repositories>
  <repository>
    <id>nexus-repository-public</id>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

releases and snapshots tags have to be configured as true to force update data from releases and snapshot repositories.

Regards,
Ricardo.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/82b26458-0149-4c59-8f79-e9f850f2b134%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
______________________________________________________
Ricardo García Fernández   
Área de Innovación, Arquitectura y Calidad de Software
Generador de Bienestar
t: 96 325 48 08

              
  
    Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada de la empresa que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona. Su dirección de correo electrónico junto a sus datos personales forman parte de un fichero titularidad de EXCENTIA CONSULTORÍA S.L. cuya finalidad es la de mantener el contacto con Ud. De acuerdo con la Ley Orgánica 15/1999, usted puede ejercitar sus derechos de acceso, rectificación, cancelación y, en su caso, oposición enviando una solicitud por escrito, acompañada de una fotocopia de su DNI dirigida a  C/ Xátiva, 14- 1ºB, 46002 Valencia
     This message and attachments are confidential. They contain confidential information company which cannot be disseminated. If you have received this email by mistake, kindly delete it from your system and notify the sender by returning to his email address. You must not copy the message and cannot be disclose the content to anyone. Your e-mail address with your personal data as part of a file owned by EXCENTIA CONSULTORÍA S.L. the end is to keep in touch with you according to the Organic Law 15/1999. You may also formulate your request for access, rectification, cancellation and opposition sending a written request with an identification card photocopy addressed to EXCENTIA CONSULTORÍA S.L. C/ Xátiva 14- 1ºB, 46002 in Valencia, Spain.

jmc...@excentia.es

unread,
Jul 29, 2015, 8:50:21 AM7/29/15
to SonarQube, julien...@sonarsource.com, guillau...@gmail.com, simon.b...@sonarsource.com, rga...@excentia.es
Hi guys!

I've finally found the problem that was driving me crazy... It was my project fault :(

Plugin configuration was harcoded on the pom.xml as follows.

<pluginManagement>
<plugins>
<!-- ... -->
<plugin>

       
<groupId>org.codehaus.mojo</groupId>
       
<artifactId>sonar-maven-plugin</artifactId>

       
<version>2.1</version>
</plugin>
<!-- ... -->
</plugins>
</pluginManagement>

Nothing to do with Maven infrastructure. Once removed previous lines from pom.xml, the proper (last) version of the mojo was downloaded.

Thanks!
Reply all
Reply to author
Forward
0 new messages