Could not find artifact when building java application using s2i with maven multimodule from GIT Submodules #1936
-
Hi Using a GIT local repo as the source for OKD/Openshift S2i build for a Java (JDK21) application on OKD 4.15. The build pulls the root Git project but then attempts to locate the POM for the GIT submodules and cannot find them in Maven Central. My understanding is that since the mvn command in the BuildConfig (below) uses the '-am" switch it should be building dependant projects like the Base submodule. (i.e. artifact au.com.cs.base:api ) Any help would be appreciated. Below are the artefacts. BuildConfig:
Both Base and Inventory projects are structured within:
Project Structure:
Note:
The OKD/Openshift Buildconfig is ocnfiured in the following YAML: The build pods runs and executes with the following maven build command:
Error experienced is:
Backend POM:
Base POM:
Inventory POM:
API POM:
TIA |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi I believe deleting the image may had something to do with it as after sometime it all started working. The only difference also is that the "also-make" is different but should have the same effect.
Anyway hope this helps someone. Thanks |
Beta Was this translation helpful? Give feedback.
Hi
I have it working now but not entirely sure how. I was initially was building with ubi8/openjdk-11 image and later I realised my mistake and changed to ubi9/openjdk-21 since my code was using Java21
I believe deleting the image may had something to do with it as after sometime it all started working. The only difference also is that the "also-make" is different but should have the same effect.
Anyway hope this helps someone.
Thanks