##[error]java.lang.IllegalStateException: The base directory of the module does not exist

  • ALM used: DevOps
  • CI system used: Azure DevOps using “build-wrapper-win-x86-64.exe”

When compiling OpenApi on temporary folder, I got the following error in my pipeline:
##[error]java.lang.IllegalStateException: The base directory of the module ‘45ED86BA-ED05-46CD-8E00-74587AA49514’ does not exist: C:\agent2_work\1\s\MvtRestApi\Scripts\temporary\src\Mvt.Rest.Client

The reason is the folder is temporary, and the source are removed (only kept the DLL) but sonar want to analyse them…

I added the MvtRestApi/**/* in sonar.exclusions but the error is still present.

How can I remove this error? because it failed the build for excluded files :frowning:



Analysis needs your source files. Can you wait until after the files are analyzed to remove them?


It is clearly a workaround, but WHY do you need so if I explicitly exclude the folder from analysis…

Moreover, it is a pity that it stops completely the analysis, and not just a warning (other files could be analysis anyway)


The build-wrapper doesn’t perform the analysis. It eavesdrops on your build to gather the environmental data analysis needs - including which files were built and therefore need to be analyzed. Change the environment between compilation & analysis and analysis will fail. As you’ve seen.