Sonar

Sonar maven plugin tries to access codehaus and maven remote repositories (stax2-api)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.1
  • Component/s: Maven Plugin
  • Labels:
    None
  • Environment:
    Linux
  • Number of attachments :
    0

Description

Hi,

The 1.9 maven plugin doesn't use our repository configuration. It tries to access maven and codehaus repositories.

That causes timeouts because we are behind a proxy. Our builds take longer.

Here is the log :

Downloading: http://cetautomatix.generali.intra:9000/deploy/maven/org/codehaus/staxmate/staxmate/2.0.0/staxmate-2.0.0.pom
Downloading: http://cetautomatix.generali.intra/nexus/content/groups/public/org/codehaus/staxmate/staxmate/2.0.0/staxmate-2.0.0.pom
[INFO] artifact org.codehaus.woodstox:stax2-api: checking for updates from sonar
[INFO] artifact org.codehaus.woodstox:stax2-api: checking for updates from public
[INFO] artifact org.codehaus.woodstox:stax2-api: checking for updates from public-all
[INFO] artifact org.codehaus.woodstox:stax2-api: checking for updates from codehaus
[WARNING] repository metadata for: 'artifact org.codehaus.woodstox:stax2-api' could not be retrieved from repository: codehaus due to an error: Error transferring file
[INFO] Repository 'codehaus' will be blacklisted
[INFO] artifact org.codehaus.woodstox:stax2-api: checking for updates from maven
[WARNING] repository metadata for: 'artifact org.codehaus.woodstox:stax2-api' could not be retrieved from repository: maven due to an error: Error transferring file
[INFO] Repository 'maven' will be blacklisted
[INFO] artifact org.codehaus.woodstox:stax2-api: checking for updates from central

Regards,
J.

Activity

Hide
Freddy Mallet added a comment -

Hello Jose, the Maven Sonar plugin just add the definition of the local Sonar Maven repository, in your case http://cetautomatix.generali.intra:9000/deploy/maven/. In your case I guess you don't use the Maven mirror feature but you've just added the definition of your local Nexus repository ? Anyway, I don't understand why Maven check for update on the stax2-api library at each build. Looks like we have a dependency on a snapshot version but I can't believe it ...

In fact, the problem seems to come from the staxmate-2.0.0.pom file. Here is what it contains :

<repository>
      <id>codehaus</id>
      <name>Codehaus</name>
      <layout>default</layout>
      <url>http://repository.codehaus.org</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
    </repository>
    <repository>
      <id>maven</id>
      <name>Maven</name>
      <layout>default</layout>
      <url>http://repo1.maven.org/maven2</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
    </repository>
Show
Freddy Mallet added a comment - Hello Jose, the Maven Sonar plugin just add the definition of the local Sonar Maven repository, in your case http://cetautomatix.generali.intra:9000/deploy/maven/. In your case I guess you don't use the Maven mirror feature but you've just added the definition of your local Nexus repository ? Anyway, I don't understand why Maven check for update on the stax2-api library at each build. Looks like we have a dependency on a snapshot version but I can't believe it ... In fact, the problem seems to come from the staxmate-2.0.0.pom file. Here is what it contains :
<repository>
      <id>codehaus</id>
      <name>Codehaus</name>
      <layout>default</layout>
      <url>http://repository.codehaus.org</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
    </repository>
    <repository>
      <id>maven</id>
      <name>Maven</name>
      <layout>default</layout>
      <url>http://repo1.maven.org/maven2</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
    </repository>
Hide
Jose Rodriguez added a comment -

Thanks !

We have configured this dirty workaround on our maven settings:

<mirrors>
...
<mirror>
<mirrorOf>codehaus</mirrorOf>
<name>Nexus Mirror Repository</name>
<url>...</url>
<id>mirror-codehaus</id>
</mirror>

<mirror>
<mirrorOf>maven</mirrorOf>
<name>Nexus Mirror Repository</name>
<url>...</url>
<id>mirror-maven</id>
</mirror>
....
</mirrors>

Regards,
J.

Show
Jose Rodriguez added a comment - Thanks ! We have configured this dirty workaround on our maven settings: <mirrors> ... <mirror> <mirrorOf>codehaus</mirrorOf> <name>Nexus Mirror Repository</name> <url>...</url> <id>mirror-codehaus</id> </mirror> <mirror> <mirrorOf>maven</mirrorOf> <name>Nexus Mirror Repository</name> <url>...</url> <id>mirror-maven</id> </mirror> .... </mirrors> Regards, J.
Hide
Freddy Mallet added a comment -

The daily update policy defined in the staxmate-2.0.0.pom file is definitely the problem.

Show
Freddy Mallet added a comment - The daily update policy defined in the staxmate-2.0.0.pom file is definitely the problem.
Hide
Freddy Mallet added a comment -

If we fix the version of the following dependencies in Sonar, the problem should be solved :

<dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>stax2-api</artifactId>
      <version>[3.0.0,3.1.0)</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <version>[4.0.1, 4.5.0)</version>
      <scope>test</scope>
    </dependency>
Show
Freddy Mallet added a comment - If we fix the version of the following dependencies in Sonar, the problem should be solved :
<dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>stax2-api</artifactId>
      <version>[3.0.0,3.1.0)</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <version>[4.0.1, 4.5.0)</version>
      <scope>test</scope>
    </dependency>

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: