jeantil commented on code in PR #2786:
URL: https://github.com/apache/james-project/pull/2786#discussion_r2280729624


##########
pom.xml:
##########
@@ -3196,6 +3196,10 @@
                                                             
<ignoreEmptyDirectories>true</ignoreEmptyDirectories>
                                                         </normalization>
                                                     </fileSet>
+                                                    <fileSet>

Review Comment:
   using the classpathElements as items in the cache key solves the invalid 
cache items so compilation works
   locally for executions in rapid succession the local cache works but on the 
ci with 5h between jobs we get cache misses with [out of order 
items](https://develocity.apache.org/c/unuozmm6ecqpc/nusnauq3l6a6u/goal-inputs?expanded=WyJuemRibm96bGFrZ2FnLWNsYXNzcGF0aGVsZW1lbnRzIiwibnpkYm5vemxha2dhZy1jbGFzc3BhdGhFbGVtZW50cy0wLWZpbGUtb3JkZXIiXQ)
 
   classpathElements is a set in the scala compiler plugin and caching it was 
inspired by [the kotlin 
example](https://github.com/gradle/develocity-build-config-samples/blob/f5a73e517ca888c0283d363e3927a2e6b00226ae/build-caching-maven-samples/kotlin-project/pom.xml#L123)
  and the [clojure 
example](https://github.com/gradle/develocity-build-config-samples/blob/f5a73e517ca888c0283d363e3927a2e6b00226ae/build-caching-maven-samples/clojure-project/pom.xml#L143)
   
   the cause is probably that the scala maven plugin creates a [new 
set](https://github.com/davidB/scala-maven-plugin/blob/a25b9424cd731b48efdd215777b67d6ec5a7f47a/src/main/java/scala_maven/ScalaTestCompileMojo.java#L61)
 with 
   ```
      @Override
     protected Set<File> getClasspathElements() throws Exception {
       Set<File> back = 
FileUtils.fromStrings(project.getTestClasspathElements());
       back.remove(new File(project.getBuild().getTestOutputDirectory()));
       addAdditionalDependencies(back);
       return back;
     }
   ```
   whereas the clojure plugin uses a [stored 
proeprty](https://github.com/talios/clojure-maven-plugin/blob/2ba8c65965ff579c37e0602f46245daebe81c71d/src/main/java/com/theoryinpractise/clojure/AbstractClojureCompilerMojo.java#L68C1-L69C44)
 
   ```
     @Parameter(required = true, readonly = true, property = 
"project.compileClasspathElements")
     protected List<String> classpathElements;
   ```
   
   the additional dependencies was added as a way to introduce compile-only  
dependencies to [generate better 
documentation](https://github.com/davidB/scala-maven-plugin/commit/647091594fbdebfa52990ce537c133b95f2fdb6c)
 
   
   not sure how to fix that T_T 



-- 
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: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to