I am totally new to sonarcloud. I am setting it up for a c++ project. The project is broken up into multiple builds like the following:
path…/mlib/db
path…/mlib/cache
path…/mlib/sync
.
.
.
and each of the paths has its own set of of source/headers and its own pom file. I am to the point in which I have updated the individual pom files to include using the build_wrapper as part of the build process and executing each of the individual build processes do generated the .log and .json output files in my build-wrapper-output directory. However, each one overwrites the previous set that was built. Which makes sense, but my question is, how do I deal with this? I have bunch of different paths that need to build and each one is going to generate its own .log and .json files. I can store them independently so they don’t overwrite each other but I have no idea how to consolidate them for the scanner to produce and overall result.
Hopefully my question made sense, being new to sonarcloud I potentially messed up some of the vocabulary.
build-wrapper can wrap any process, if you have a parent pom from where you can launch the build you can wrap that build, or you can create a build.sh:
I decided to try to wrap the high level mvn command but that turns out to be an issue. Even from the command line:
$ build-wrapper-win-x86-64.exe --out-dir aDir mvn
[SONARSOURCE BUILD-WRAPPER] failed to execute mvn: The system cannot find the file specified.
it complains that mvn can’t be found.
mvn can be found running it by itself:
$ mvn
[INFO] Scanning for projects…
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
And to further my confusion, if I try to specify the full path of the mvn command:
$ build-wrapper-win-x86-64.exe --out-dir aDir C:/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin/mvn
[SONARSOURCE BUILD-WRAPPER] failed to execute C:/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin/mvn: %1 is not a valid Win32 application.
Did you try it with writting the extension(.cmd?). I guess there is two mvn files in that directory: build-wrapper-win-x86-64.exe --out-dir aDir C:/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin/mvn.cmd