Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.1
-
Fix Version/s: 1.1
-
Component/s: None
-
Labels:None
Description
Hello,
There is a problem with the Maven Embedder 2.0.4. The Embedder doesn't use the settings.xml file (at least, not the <mirror> section). In my company we use Apache Archiva as our Maven2 proxy which is defined as a <mirrorOf> central in our settings.xml files. Because of the fact that Sonar uses the Maven2 embedder and we have to use our proxy, the mvn sonar goal fails because it can't download the necessary plugins. It tries to use a direct internet connection instead of the mirrors defined in the settings.xml file.
I think this is not only a problem when using mirrors, but also when defining a <proxy> in your settings.xml file.
If I'm correct, the Maven2 Eclipse plugin suffered from the same issue and they transitioned to the Maven Embedder 2.1-SNAPSHOT version.
Fixed by refactoring of the sonar plugin and creation of our own sonar maven embedder (ch.hortis.sonar.mvn.SonarMavenEmbedder) which is using the settings object provided by the maven runtime. This sonar embedder has also some modification to correctly configure the WagonManager used by the embedder, especially to setup the proxies and mirrors provided in the settings object.