# Provide option to fork Sonar analysis

**URL:** <https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528>\
**Category:** Old Forum Archive\
**Created:** [November 30, 2012, 11:08pm UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528 "2012-11-30T23:08:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajoberstar](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/ajoberstar/32/127_2.png) [@ajoberstar](https://discuss.gradle.org/u/ajoberstar)\
**Post date:** [November 30, 2012, 11:08pm UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/1 "2012-11-30T23:08:00Z")

</div>

Sonar analysis has been the only thin so far that has required me to increase the heap or perm gen space for the Gradle build. It would be nice to have the option of forking the process, to avoid that issue.

---

<div class="post-metadata">

**Author:** ![Spencer\_Allain](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Spencer\_Allain](https://discuss.gradle.org/u/Spencer_Allain)\
**Post date:** [December 3, 2012, 9:09pm UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/2 "2012-12-03T21:09:00Z")

</div>

Definitely have to agree here. With any sizable codebase, especially ones including several third part dependencies, it doesn’t take long for PermGen errors to occur when running the sonarAnalyze task with the default JVM settings.

If it could be forked with it’s own JVM settings (much like for unit tests), then the adjusted PermGen setting would be localized just to the needs of sonarAnalyze and not take effect every time gradle/gradlew is invoked for other tasks.

-Spencer

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [December 4, 2012, 11:33am UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/3 "2012-12-04T11:33:00Z")

</div>

Good suggestion. Probably Sonar analysis should always run in a separate process. I’ve created GRADLE-2587 for this.

---

<div class="post-metadata">

**Author:** ![ajoberstar](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/ajoberstar/32/127_2.png) [@ajoberstar](https://discuss.gradle.org/u/ajoberstar)\
**Post date:** [February 27, 2013, 11:22pm UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/4 "2013-02-27T23:22:00Z")

</div>

I was just about to look into options for fixing this when I saw the new SonarRunner code in Gradle. This looks like it will solve a _lot_ of issues! Hopefully Sonar Runner 2.1 can also be integrated in time for 1.5, so we can get the forking ability. Thanks, guys!

See more info in the [nightly user guide](http://www.gradle.org/docs/nightly/userguide/sonar_runner_plugin.html).

---

<div class="post-metadata">

**Author:** ![Andrea\_Panattoni](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/andrea_panattoni/32/1408_2.png) [@Andrea\_Panattoni](https://discuss.gradle.org/u/Andrea_Panattoni)\
**Post date:** [March 14, 2014, 7:39am UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/5 "2014-03-14T07:39:00Z")

</div>

Is there any update on this issue?

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [March 14, 2014, 10:12pm UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/6 "2014-03-14T22:12:00Z")

</div>

No news so far. This would be a good opportunity for a community contribution.

---

<div class="post-metadata">

**Author:** ![Andrea\_Panattoni](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/andrea_panattoni/32/1408_2.png) [@Andrea\_Panattoni](https://discuss.gradle.org/u/Andrea_Panattoni)\
**Post date:** [March 16, 2014, 8:20pm UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/7 "2014-03-16T20:20:00Z")

</div>

Ok, I’ll try to tackle it

---

<div class="post-metadata">

**Author:** ![Boris\_Lopez](https://avatars.discourse-cdn.com/v4/letter/b/76d3ee/32.png) [@Boris\_Lopez](https://discuss.gradle.org/u/Boris_Lopez)\
**Post date:** [July 21, 2014, 11:08pm UTC](https://discuss.gradle.org/t/provide-option-to-fork-sonar-analysis/528/8 "2014-07-21T23:08:00Z")

</div>

Hello Is there any update on this? Or is there any workaround to run Sonar on a separate process?

Thanks!
