0

I have a multi module project like this

<modules>
  <module>moduleA</module>
  <module>moduleB</module>
  <module>moduleC</module>
  <module>moduleD</module>
</modules>

I have to use docker container for building modules moduleB and moduleC. The container's image for both modules is the same. For docker I use io.fabric8 docker-maven-plugin.

Now I can run both modules in different containers. Unfortunately it spends a lot of time for starting container and that's why I want to run container only one time and build both modules in the same container.

I tried to configure executions block in io.fabric8 plugin, but don't have any positive result. Could anybody say if is it possible and if yes, how? Thanks.

Maxim Popov
  • 1,167
  • 5
  • 9
  • The question is: Why do you have to use Docker? Does make it sense? What do you means by `for building modules moduleB...` The building of modules should be done by a Maven call like `mvn clean package` from root of your multi module build.... – khmarbaise Apr 04 '18 at 16:44
  • We generate jooq model classes from postgress instances, which works in the docker container. Yes, we use 'mvn package' and this gives rise to the following actions while building some child modules: 1) start docker container with postgress; 2) apply flyway DB migrates scripts; 3) generate java classes. Unfortunately, several modules do the same action, but for different scheme. Thats why we want to run only on docker pg container and work with him in these modules. – Maxim Popov Apr 05 '18 at 12:17

0 Answers0