I would just like to start from a clean cache every time. I have tried deleting the
Code:
ConnectedGlobalConfiguration connectedGlobalConfiguration = ConnectedGlobalConfiguration.builder()
.setServerId(propertiesFileReader.getProjectKey())
.setStorageRoot(Paths.get(Const.SONARQUBE_CACHE_STORAGE))
.setSonarLintUserHome(Paths.get(Const.SONARQUBE_CACHE))
.setWorkDir(Paths.get(Const.SONARQUBE_CACHE_WORK))
.setLogOutput(logOutput)
.build();
ConnectedSonarLintEngineImpl connectedSonarLintEngineImpl = new ConnectedSonarLintEngineImpl(connectedGlobalConfiguration);
/*This updates the cache with the rules and other metadata from the server. */
connectedSonarLintEngineImpl.update(serverConfiguration, null); ( Command 1)
/* This updates the cache with the issues from the server. Wording is not consistent. It should be updateProject */
connectedSonarLintEngineImpl.updateModule(serverConfiguration, propertiesFileReader.getProjectKey(), null); ( Command 2)
1 INFO: An exception was caught and reported. Message: java.nio.file.AccessDeniedException: C:\Users\acs3\.sonarlintcache\work\.sonartmp_1291381066257992562\244719524204279168 -> C:\Users\acs3\.sonarlintcache\storage\CNI\modules\CNI
2017-08-02 20:20:02.821 java.lang.IllegalStateException: Unable to move C:\Users\acs3\.sonarlintcache\work\.sonartmp_1291381066257992562\244719524204279168 to C:\Users\acs3\.sonarlintcache\storage\CNI\modules\CNI
2017-08-02 20:20:02.821 at org.sonarsource.sonarlint.core.client.api.util.FileUtils.moveDir(FileUtils.java:47)
2017-08-02 20:20:02.821 at org.sonarsource.sonarlint.core.client.api.util.FileUtils.replaceDir(FileUtils.java:153)
2017-08-02 20:20:02.821 at org.sonarsource.sonarlint.core.container.connected.update.perform.ModuleStorageUpdateExecutor