enhancement
major
minor
major
minor
major
#29925
TestGenerateJavaIntegration fails with the split local Maven repository of the CI builds
Problem
Since the CI builds use the shared split local repository of #29919 (-Dmaven.repo.local=$HOME/.m2/shared-repository -Daether.enhancedLocalRepository.split=true -Daether.enhancedLocalRepository.localPrefix=installed/$BUILD_TAG), test.com.top_logic.build.maven.generate.TestGenerateJavaIntegration#testGenerateInNeverInstalledApplication fails in every PR build that runs it:
[ERROR] Plugin com.top-logic:tl-maven-plugin:8.0.0-SNAPSHOT or one of its dependencies could not be resolved: [ERROR] Could not find artifact com.top-logic:tl-maven-plugin:jar:8.0.0-SNAPSHOT in local.central (file:///var/lib/jenkins/.m2/shared-repository/)
The test gives the build of the generated application the local repository of the running build (${settings.localRepository}) as file: repository. In the split layout the artifacts installed by the build are under installed/<build tag>/ and the downloaded ones under cached/; the repository root contains neither.
Solution
- The test passes the split settings of the running build (aether.enhancedLocalRepository.split, localPrefix, remotePrefix) to the test. With a split repository, the application build gets the installed and the cached part as file: repositories; without, the repository root as before.
- The application build itself runs with an unsplit local repository (aether.enhancedLocalRepository.split=false), which the build inherits otherwise through MAVEN_ARGS: the test checks the plain layout of that repository.
The shared repository of #29919 is reverted in tl-ci until the open engine branches contain this fix.