in my maven based project with mixed test sources (java + groovy) at each build all the groovy based tests are recompiled again and again.
While as java sources recompilation is skipped - if there are no changes - groovy sources are always considered eligible for recompilation and recompiled each time mvn build is executed :-(
Is it a feature or bug?
Is there a way of how to configure maven-compiler-plugin together with gmavenplus-plugin to detect there are no changes?
I'm using java 12 to compile java sources. (but used to use java 8 and 11 with the same behaviour)
I'm using groovy 2.5.7 to compile my sources.
An excerpt from my pom can be seen below.
Thanks Jan
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<useIncrementalCompilation>true</useIncrementalCompilation>
<parameters>true</parameters>
<compilerArgs>
<arg>-Xpkginfo:always</arg>
</compilerArgs>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.7.1</version>
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
<configuration>
<invokeDynamic>true</invokeDynamic>
<testSources>
<testSource>
<directory>${project.basedir}/src/test/java</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
</testSources>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>