Quantcast

The plugin 'org.apache.maven.plugins:maven-sonar-plugin' does not exist or no valid version could be foun

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

The plugin 'org.apache.maven.plugins:maven-sonar-plugin' does not exist or no valid version could be foun

romain.seguy
Hi guys,

I'm running in troubles while running Sonar 2.1.2 + Maven 2.2.1 + Hudson 1.363: I keep on getting the famous "org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-sonar-plugin' does not exist or no valid version could be found" error, being unable to fix it using the standard methods (e.g. the one listed in this mail exchange: http://comments.gmane.org/gmane.comp.java.sonar.general/5010 or in the Sonar FAQ)

I have the following configuration:
- Machine A has Hudson, Maven, Sonar and MySQL installed. Hudson and Sonar are available for the first one through HTTPS only (https://a/hudson), for the second one through HTTP (http://a/sonar). This machine also exposes a local Maven repository (no Nexus nor any other artifact management tool) through http://a/maven2. This Maven repo is populated "by hand" when needed.
- Machine B is a Hudson slave, tight through SSH to machine A, with Maven installed locally. This Maven installation is set up using <MAVEN_HOME>/conf/settings.xml as follow:

<mirrors>
  <mirror>
    <id>a</id>
    <name>a</name>
    <url>http://a/maven2</url>
    <mirrorOf>external:*,!sonar</mirrorOf>
  </mirror>
</mirrors>

I don't use the ~/.m2 way of setting up the things.

I have a job which is assigned to machine B so, when it runs, the following command is issued on machine B:

/blabla/apache-maven-2.2.1/bin/mvn -f pom.xml -U -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://a:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8 blabla blabla -Dsonar.host.url=http://a/sonar

(Notice I've added -U in this case to force the repo update)

What's weird is that the same command perfectly works from the A machine.

Any clue?

Regards,
Romain
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The plugin 'org.apache.maven.plugins:maven-sonar-plugin' does not exist or no valid version could be foun

Olivier Gaudin-2
Romain, 

I am not a mirror expert, nut I believe that you might need something like :

<mirrors>
  <mirror>
    <id>nexus</id>
    <mirrorOf>*</mirrorOf>
    <url>http://XXX.XXX.X.X:XXXX/nexus/content/groups/public</url>
  </mirror>
</mirrors>
<profiles>
  <profile>
    <id>nexus</id>
    <repositories>
      <repository>
        <id>central</id>
        <url>http://central</url>
        <releases><enabled>true</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
      </repository>
    </repositories>
    <pluginRepositories>
      <pluginRepository>
        <id>central</id>
        <url>http://central</url>
        <releases><enabled>true</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
      </pluginRepository>
    </pluginRepositories>
  </profile>
</profiles>

Could you also send the full trace of error and try to remove the sonar plugin from both local and remote repo ?

Olivier


On Tue, Jul 27, 2010 at 1:38 PM, Romain Seguy <[hidden email]> wrote:
Hi guys,

I'm running in troubles while running Sonar 2.1.2 + Maven 2.2.1 + Hudson 1.363: I keep on getting the famous "org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-sonar-plugin' does not exist or no valid version could be found" error, being unable to fix it using the standard methods (e.g. the one listed in this mail exchange: http://comments.gmane.org/gmane.comp.java.sonar.general/5010 or in the Sonar FAQ)

I have the following configuration:
- Machine A has Hudson, Maven, Sonar and MySQL installed. Hudson and Sonar are available for the first one through HTTPS only (https://a/hudson), for the second one through HTTP (http://a/sonar). This machine also exposes a local Maven repository (no Nexus nor any other artifact management tool) through http://a/maven2. This Maven repo is populated "by hand" when needed.
- Machine B is a Hudson slave, tight through SSH to machine A, with Maven installed locally. This Maven installation is set up using <MAVEN_HOME>/conf/settings.xml as follow:

<mirrors>
  <mirror>
    <id>a</id>
    <name>a</name>
    <url>http://a/maven2</url>
    <mirrorOf>external:*,!sonar</mirrorOf>
  </mirror>
</mirrors>

I don't use the ~/.m2 way of setting up the things.

I have a job which is assigned to machine B so, when it runs, the following command is issued on machine B:

/blabla/apache-maven-2.2.1/bin/mvn -f pom.xml -U -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://a:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8 blabla blabla -Dsonar.host.url=http://a/sonar

(Notice I've added -U in this case to force the repo update)

What's weird is that the same command perfectly works from the A machine.

Any clue?

Regards,
Romain

Loading...