Closed donovanmuller closed 6 years ago
Multi module Maven projects expose a bug where the S2I scripts do not cater for built .jar files in child modules. I.e. when trying to build Gluon:
.jar
$ s2i build https://github.com/absa-subatomic/gluon.git absasubatomic/s2i-jdk8-maven3-subatomic subatomic-gluon ... [INFO] Building jar: /tmp/src/nucleus/target/nucleus-0.1.0.BUILD-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Gluon .............................................. SUCCESS [ 0.002 s] [INFO] Subatomic domain implementation .................... SUCCESS [02:44 min] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:50 min [INFO] Finished at: 2018-02-26T06:30:49Z [INFO] Final Memory: 34M/223M [INFO] ------------------------------------------------------------------------ Copying Maven artifacts from /tmp/src/target to /deployments ... /usr/local/s2i/assemble: line 62: cd: /tmp/src/target: No such file or directory Running: cp *.jar /deployments cp: cannot stat '*.jar': No such file or directory Aborting due to error code 1 for copying artifacts from /tmp/src/target to /deployments Build failed ERROR: An error occurred: non-zero (13) exit code from absasubatomic/s2i-jdk8-maven3-subatomic
the scripts cannot locate the Maven artifact in nucleus/target/nucleus-0.1.0.BUILD-SNAPSHOT.jar
nucleus/target/nucleus-0.1.0.BUILD-SNAPSHOT.jar
Turns out this is actually already supported by the base RHEL S2I Java builder image.
Also see:
This was related to https://github.com/absa-subatomic/gluon/issues/29
Multi module Maven projects expose a bug where the S2I scripts do not cater for built
.jar
files in child modules. I.e. when trying to build Gluon:the scripts cannot locate the Maven artifact in
nucleus/target/nucleus-0.1.0.BUILD-SNAPSHOT.jar