guylabs commented on PR #394:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/394#issuecomment-3714680789

   @cowwoc Running a build with these changes and 
`-Dmaven.build.cache.enabled=false` set fails the build and prints this 
exception:
   
   ```
   [ERROR] Cache is not initialized. Actual state: DISABLED
   java.lang.IllegalStateException: Cache is not initialized. Actual state: 
DISABLED
       at 
org.apache.maven.buildcache.xml.CacheConfigImpl.checkInitializedState(CacheConfigImpl.java:648)
       at 
org.apache.maven.buildcache.xml.CacheConfigImpl.getAttachedOutputs(CacheConfigImpl.java:582)
       at 
org.apache.maven.buildcache.CacheControllerImpl.collectCachedArtifactPaths(CacheControllerImpl.java:1315)
       at 
org.apache.maven.buildcache.CacheControllerImpl.stagePreExistingArtifacts(CacheControllerImpl.java:1249)
       at 
org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute(BuildCacheMojosExecutionStrategy.java:161)
       at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
       at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:61)
       at 
org.apache.maven.lifecycle.internal.DefaultLifecycleStarter.execute(DefaultLifecycleStarter.java:123)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:310)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:225)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:149)
       at 
org.apache.maven.cling.invoker.mvn.MavenInvoker.doExecute(MavenInvoker.java:452)
       at 
org.apache.maven.cling.invoker.mvn.MavenInvoker.execute(MavenInvoker.java:97)
       at 
org.apache.maven.cling.invoker.mvn.MavenInvoker.execute(MavenInvoker.java:81)
       at 
org.apache.maven.cling.invoker.LookupInvoker.doInvoke(LookupInvoker.java:165)
       at 
org.apache.maven.cling.invoker.LookupInvoker.invoke(LookupInvoker.java:134)
       at org.apache.maven.cling.ClingSupport.run(ClingSupport.java:76)
       at org.apache.maven.cling.MavenCling.main(MavenCling.java:64)
       at 
org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
       at 
org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
       at 
com.gradle.testlib.use.runner.Embedded3xLauncher.doMain(Embedded3xLauncher.groovy:315)
       at 
com.gradle.testlib.use.runner.Embedded3xLauncher$_run_closure3.doCall(Embedded3xLauncher.groovy:282)
       at 
com.gradle.testlib.use.runner.Embedded3xLauncher$_run_closure3.call(Embedded3xLauncher.groovy)
       at java.util.concurrent.FutureTask.run(FutureTask.java:317)
       at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
       at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
       at java.lang.Thread.run(Thread.java:1583)
   [ERROR] 
   ```
   
   Running it together with `-Dmaven.build.cache.cacheCompile=false` will not 
fail the build.
   
   Would it be possible to include this use case as well, as this is an 
official configuration option? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to