i have following in pom.xml enable sonar plugin:
<plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>sonar-maven-plugin</artifactid> <version>2.7.1</version> </plugin>
i have set property define server runs on port 80:
<properties> <sonar.host.url>http://sonar.for.truelocal.com.au/</sonar.host.url> </properties>
when running bamboo server, , analysis sent server.
i wanted run preview report in local environment. local environment mac 10.11.2 java 7 behind proxy server.
i added properties dev maven profile:
<sonar.analysis.mode>preview</sonar.analysis.mode> <sonar.issuesreport.console.enable>true</sonar.issuesreport.console.enable> <sonar.issuesreport.html.enable>true</sonar.issuesreport.html.enable>
unfortunately sonar step fails following:
[debug] create : /users/w26702/.sonar/cache/_tmp [debug] extract sonar-runner-batch in temp... [debug] bootstrap index... [debug] download: http://sonar.for.truelocal.com.au/batch_bootstrap/index [debug] bootstrap completed [debug] download http://sonar.for.truelocal.com.au/batch/sonar-batch-shaded-5.2.jar /users/w26702/.sonar/cache/_tmp/filecache3157929989449184462.tmp [error] failed execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar (default) on project truelocal-api: fail download libraries server: fail download sonar-batch-shaded-5.2.jar /users/w26702/.sonar/cache/_tmp/filecache3157929989449184462.tmp: timeout: read timed out -> [help 1]
note last line specifies different plugin quoted above in pom. because after org.codehaus.mojo 2.7.1 didn't work switched org.sonarsource.scanner.maven 3.0.1 did not make difference.
i logged on sonarqube server , tailed access log while running build , see requests /batch_bootstrap/index , /batch/sonar-batch-shaded-5.2.jar http 200 oks.
it seems index received .jar not.
i manually browsed jar address in web browser , downloaded correctly.
i disconnected corporate network , instead tethered phone has no proxy.
when running this, jars downloaded , analysis runs without issue.
when put machine behind proxy, analysis continues run without issue because jars have been downloaded.
so question is, there bug plugin downloading jars when behind proxy?
i can't rule out possibility of corporate network causing issue other jars including sonar-maven-plugin jar not have issues.
my sonarqube server version 5.1-1 on amazon linux postgresql backend.
this version of sonar-maven-plugin not seems able proxy parameters maven settings.xml
so need provide proxy parameter javaopts :
for example:
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar -dhttp.proxyhost=proxy.mycompagny.com -dhttp.proxyport=8080 -dhttps.proxyhost=proxy.mycompagny.com -dhttps.proxyport=8080
Comments
Post a Comment