This is an automated email from the ASF dual-hosted git repository.

jhelou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 1a3d4dac2807800908c1ed4ce2e647ffff2c2fb2
Author: Jean Helou <j...@xn--gml-cma.com>
AuthorDate: Fri Aug 15 22:27:44 2025 +0200

    [JAMES-3978] build cache for scala compiler plugin
---
 pom.xml | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 265 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index cc307d671a..7ee40d7e12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3179,6 +3179,263 @@
                                         </execution>
                                     </executions>
                                 </plugin>
+                                <plugin>
+                                    <groupId>net.alchim31.maven</groupId>
+                                    <artifactId>scala-maven-plugin</artifactId>
+                                    <executions>
+                                        <execution>
+                                            <id>scala-compile-first</id>
+                                            <inputs>
+                                                <fileSets>
+                                                    <fileSet>
+                                                        <name>sourceDir</name>
+                                                        
<includesProperty>includes</includesProperty>
+                                                        
<excludesProperty>excludes</excludesProperty>
+                                                        <normalization>
+                                                            
<ignoreLineEndings>true</ignoreLineEndings>
+                                                            
<ignoreEmptyDirectories>true</ignoreEmptyDirectories>
+                                                        </normalization>
+                                                    </fileSet>
+                                                    <fileSet>
+                                                        
<name>classpathElements</name>
+                                                        
<normalization>COMPILE_CLASSPATH</normalization>
+                                                    </fileSet>
+                                                </fileSets>
+                                                <properties>
+                                                    <property>
+                                                        
<name>addJavacArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>addScalacArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>additionalDependencies</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>args</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>checkMultipleScalaVersions</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>compileOrder</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>displayCmd</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>encoding</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>failOnMultipleScalaVersions</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>forceUseArgFile</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>fork</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>javacArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>jvmArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>recompileMode</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>release</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaClassName</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaCompatVersion</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>scalaHome</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaOrganization</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaVersion</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>sendJavaToScalac</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>skipMain</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>source</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>target</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>useCanonicalPath</name>
+                                                    </property>
+                                                </properties>
+                                                <ignoredProperties>
+                                                    <ignore>project</ignore>
+                                                    <ignore>session</ignore>
+                                                    
<ignore>notifyCompilation</ignore>
+                                                    
<ignore>javacGenerateDebugSymbols</ignore>
+                                                    <!-- ignoring these feels 
wrong but I couldn't find a way to track them -->
+                                                    
<ignore>pluginArtifacts</ignore>
+                                                    
<ignore>dependencies</ignore>
+                                                    
<ignore>compilerPlugins</ignore>
+                                                    <ignore>classpath</ignore>
+                                                </ignoredProperties>
+                                            </inputs>
+                                            <outputs>
+                                                <cacheableBecause>compilation 
is CPU-bound</cacheableBecause>
+                                                <directories>
+                                                    <directory>
+                                                        <name>outputDir</name>
+                                                    </directory>
+                                                </directories>
+                                            </outputs>
+                                            <localState>
+                                                <fileSets>
+                                                    <fileSet>
+                                                        
<name>secondaryCacheDir</name>
+                                                    </fileSet>
+                                                    <fileSet>
+                                                        
<name>analysisCacheFile</name>
+                                                    </fileSet>
+                                                </fileSets>
+                                            </localState>
+                                        </execution>
+                                        <execution>
+                                            <id>scala-test-compile</id>
+                                            <skipIfTrue>
+                                                <property>skip</property>
+                                            </skipIfTrue>
+                                            <inputs>
+                                                <fileSets>
+                                                    <fileSet>
+                                                        
<name>testSourceDir</name>
+                                                        
<includesProperty>includes</includesProperty>
+                                                        
<excludesProperty>excludes</excludesProperty>
+                                                        <normalization>
+                                                            
<ignoreLineEndings>true</ignoreLineEndings>
+                                                            
<ignoreEmptyDirectories>true</ignoreEmptyDirectories>
+                                                        </normalization>
+                                                    </fileSet>
+                                                    <fileSet>
+                                                        
<name>classpathElements</name>
+                                                        
<normalization>COMPILE_CLASSPATH</normalization>
+                                                    </fileSet>
+                                                </fileSets>
+                                                <properties>
+                                                    <property>
+                                                        
<name>addJavacArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>addScalacArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>additionalDependencies</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>args</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>checkMultipleScalaVersions</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>compileOrder</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>displayCmd</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>encoding</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>failOnMultipleScalaVersions</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>forceUseArgFile</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>fork</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>javacArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>jvmArgs</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>recompileMode</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>release</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaClassName</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaCompatVersion</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>scalaHome</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaOrganization</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>scalaVersion</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>sendJavaToScalac</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>source</name>
+                                                    </property>
+                                                    <property>
+                                                        <name>target</name>
+                                                    </property>
+                                                    <property>
+                                                        
<name>useCanonicalPath</name>
+                                                    </property>
+                                                </properties>
+                                                <ignoredProperties>
+                                                    <ignore>project</ignore>
+                                                    <ignore>session</ignore>
+                                                    
<ignore>notifyCompilation</ignore>
+                                                    
<ignore>javacGenerateDebugSymbols</ignore>
+                                                    <!-- ignoring these feels 
wrong but I couldn't find a way to track them -->
+                                                    
<ignore>pluginArtifacts</ignore>
+                                                    
<ignore>dependencies</ignore>
+                                                    
<ignore>compilerPlugins</ignore>
+                                                </ignoredProperties>
+                                            </inputs>
+                                            <outputs>
+                                                <cacheableBecause>compilation 
is CPU-bound with well-defined inputs and outputs</cacheableBecause>
+                                                <directories>
+                                                    <directory>
+                                                        
<name>testOutputDir</name>
+                                                    </directory>
+                                                </directories>
+                                            </outputs>
+                                            <localState>
+                                                <fileSets>
+                                                    <fileSet>
+                                                        
<name>secondaryCacheDir</name>
+                                                    </fileSet>
+                                                    <fileSet>
+                                                        
<name>testAnalysisCacheFile</name>
+                                                    </fileSet>
+                                                </fileSets>
+                                            </localState>
+                                        </execution>
+                                    </executions>
+                                </plugin>
                             </plugins>
                         </develocity>
                     </configuration>
@@ -3204,7 +3461,7 @@
                 <plugin>
                     <groupId>net.alchim31.maven</groupId>
                     <artifactId>scala-maven-plugin</artifactId>
-                    <version>4.9.5</version>
+                    <version>4.9.6</version>
                     <configuration>
                         <recompileMode>all</recompileMode>
                         <source>${target.jdk}</source>
@@ -3233,9 +3490,15 @@
                     </configuration>
                     <executions>
                         <execution>
-                            <id>scala-compile-first</id>
+                            <id>scala-add-source</id>
                             <goals>
                                 <goal>add-source</goal>
+                            </goals>
+                            <phase>process-resources</phase>
+                        </execution>
+                        <execution>
+                            <id>scala-compile-first</id>
+                            <goals>
                                 <goal>compile</goal>
                             </goals>
                             <phase>process-resources</phase>


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

Reply via email to