Build OK in local, KO in CI

I get the same build problem as in the ticket 2412

But in my case, it’s a full kotlin addon (1.5.0) which build in local (IntelliJ, cli) and CI,
and another full kotlin child addon (1.5.0) which build in local (IntelliJ, cli) (in composite or independent projet) but not in CI.

For another team menber, the build local is OK in composite (IntelliJ, cli),
but same build problem as CI as independent project (IntelliJ, cli)

Running with gitlab-runner 14.8.0 (565b6c0b)
  on runner-usain-bolt 8EzfN8yM
Preparing the "docker" executor
00:06
Using Docker executor with image gradle:7.5.1-jdk17-alpine ...
Pulling docker image gradle:7.5.1-jdk17-alpine ...
Using docker image sha256:d627daef538e64d91a273fcf74477f4579a0eed00763e9de6bf3f6d6f12227dd for gradle:7.5.1-jdk17-alpine with digest gradle@sha256:a832804262907459866a0bcd5a61ca4f21e120a841c12afb51163cc1af2b49b2 ...
Preparing environment
Running on runner-8ezfn8ym-project-136-concurrent-0 via bb0328c709b8...
Getting source from Git repository
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/company/addon-address/.git/
Checking out a953ba62 as master...
Removing .gradle/
Removing addon-address-starter/build/
Removing addon-address/build/
Removing build/
Skipping Git submodules setup
Restoring cache
Checking cache for 6-protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted. 
Successfully extracted cache
Executing "step_script" stage of the job script
Using docker image sha256:d627daef538e64d91a273fcf74477f4579a0eed00763e9de6bf3f6d6f12227dd for gradle:7.5.1-jdk17-alpine with digest gradle@sha256:a832804262907459866a0bcd5a61ca4f21e120a841c12afb51163cc1af2b49b2 ...
$ GRADLE_USER_HOME="$(pwd)/.gradle"
$ export GRADLE_USER_HOME
$ gradle test build --build-cache -I=$GRADLE_INIT_FILE
Welcome to Gradle 7.5.1!
Here are the highlights of this release:
 - Support for Java 18
 - Support for building with Groovy 4
 - Much more responsive continuous builds
 - Improved diagnostics for dependency resolution
For more details see https://docs.gradle.org/7.5.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :addon-address:processResources
> Task :addon-address:sourcesJar
> Task :addon-address:processTestResources
> Task :addon-address-starter:processResources
> Task :addon-address-starter:sourcesJar
> Task :addon-address-starter:processTestResources NO-SOURCE
> Task :addon-address:compileKotlin
Enhancing entities in project ':addon-address' for source set 'main'
Project entities:
    JPA: [com.company.addon.address.entity.BaseAddress, com.company.addon.address.entity.ZipCode, com.company.addon.address.entity.Country, com.company.addon.address.entity.City];
    DTO: [];
Project converters: [].
Running EclipseLink enhancer in project ':addon-address' for source set 'main'
Exception in thread "main" Local Exception Stack: 
Exception [EclipseLink-40007] (Eclipse Persistence Services - 2.7.9.6-jmix): org.eclipse.persistence.exceptions.StaticWeaveException
Exception Description: An exception was thrown while weaving: [Ljava.lang.String;@6956de9
Internal Exception: java.nio.file.NoSuchFileException: /builds/company/addon-address/addon-address/build/tmp/entitiesEnhancing/main/persistence
	at org.eclipse.persistence.exceptions.StaticWeaveException.exceptionPerformWeaving(StaticWeaveException.java:140)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeave.main(StaticWeave.java:88)
Caused by: java.nio.file.NoSuchFileException: /builds/company/addon-address/addon-address/build/tmp/entitiesEnhancing/main/persistence
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1264)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:347)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:318)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:284)
	at org.eclipse.persistence.internal.jpa.deployment.ArchiveFactoryImpl.createArchive(ArchiveFactoryImpl.java:95)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.buildClassTransformers(StaticWeaveClassTransformer.java:108)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.<init>(StaticWeaveClassTransformer.java:78)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.process(StaticWeaveProcessor.java:252)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.performWeaving(StaticWeaveProcessor.java:174)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeave.start(StaticWeave.java:117)
	at org.eclipse.persistence.tools.weaving.jpa.StaticWeave.main(StaticWeave.java:86)
> Task :addon-address:compileKotlin FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':addon-address:compileKotlin'.
> Process 'command '/opt/java/openjdk/bin/java'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 51s
6 actionable tasks: 6 executed
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1

I need help…

I created a public repo in the CI

The project is a fresh new created addon, the build is ok on local but KO on CI.
I have others jmix addon private repo in the CI with a CI build OK (same ci-cd/.gitlab-ci.yml, same runner)

I see that your CI build uses gradle 7.5.1 while Jmix 1.5 uses gradle 7.6. Try upgrading the gradle version on CI. Maybe this can help somehow.

I set the CI with gradle:7.6-jdk17-alpine but there is no change.

Addon commons an thirdparty are always OK
Addon address and sequence always KO

and the Addon test build is always KO too

It’s hard to say what is the reason for this unless we have exact steps how to reproduce the problem locally. Try disabling gradle build cache ( remove --build-cache) and adding the --info logging level to the build command. Maybe anything new will be displayed in the log.

I have already two jobs, one with with cache, another without cache

I added --info

Addon with uppercase Project id XXX generated on a case insensitive file system can produced
some file with XXX or Xxx.