#26 Support init scripts for test containers - #35
Conversation
| throw new MojoExecutionException("Error running jOOQ code generation tool", ex); | ||
| } finally { | ||
| closeClassloader(oldCL, mavenClassloader); | ||
| try (var closableContextClassLoader = new ClosableContextClassLoader(getMavenClassloader())) { |
There was a problem hiding this comment.
Reworked it to set context ClassLoader before running the container, to be able loading initScript from classpath.
Unfortunately tests as they are cannot cover this case properly (they successfully work without this change). I can try implementing multi-module test to cover it (to make it failing without the change)
|
@sivaprasadreddy , @mzagar, @eddumelendez , could you please merge approved PRs and publish new release? |
|
@kiview can you please approve? |
eddumelendez
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I would suggest next time discussing the feature before raising a PR. No immediate action for now, I see some other options
- Support copy file
- Support volume mount
- Execute scripts using ScriptUtils (this PR)
Currently, the suggested approach is using copy files instead due to most of the images provides a fresh initialization folder.
| * Optional | ||
| */ | ||
| @Parameter | ||
| private String initScript; |
There was a problem hiding this comment.
if scripts support is added then supporting a list would be more flexible.
@eddumelendez , could you please check my questions in the issue? #26 |
#26 Feature: Support for TC_INITSCRIPT parameter