From ccd0fbf737f78be94dfc981c61a03e1bd26e5883 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Tue, 24 Sep 2019 16:26:34 +0100 Subject: [PATCH] Convert start/stop db into a profile. Now we're using the docker-maven-plugin for building images and also for starting/stopping the db, we need to ensure we don't skip it at the wrong time. It's simpler to avoid using the element at all, and instead use a profile based on the skip.integrationtests property so that we only start the db when running integration tests. --- pom.xml | 132 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 69 insertions(+), 63 deletions(-) diff --git a/pom.xml b/pom.xml index 2a741aca98..8a502651ed 100644 --- a/pom.xml +++ b/pom.xml @@ -278,13 +278,6 @@ build - - build-image-verify - verify - - build - - @@ -454,6 +447,74 @@ + + start-db + + + skip.integrationtests + false + + + + + + io.fabric8 + docker-maven-plugin + ${fabric8.docker.version} + + + + test-database + postgres:${postgres.version} + + + ${database.port}:${postgresql.port} + + + ${alfresco.db.password} + ${alfresco.db.username} + ${alfresco.test.db.name} + + + -c max_connections=300 + + + database system is ready to accept connections + + + + + + alfresco/alfresco-activemq:${activemq.version} + + + ${activemq.port1}:${activemq.port1} + ${activemq.port2}:${activemq.port2} + + + + + + + + start + pre-integration-test + + start + + + + stop + post-integration-test + + stop + + + + + + + @@ -494,6 +555,7 @@ 2.9.8 0.25.0 + . 1.10.19 42.2.5 5432 @@ -1118,62 +1180,6 @@ - - io.fabric8 - docker-maven-plugin - ${fabric8.docker.version} - - - - test-database - postgres:${postgres.version} - - - ${database.port}:${postgresql.port} - - - ${alfresco.db.password} - ${alfresco.db.username} - ${alfresco.test.db.name} - - - -c max_connections=300 - - - database system is ready to accept connections - - - - - - alfresco/alfresco-activemq:${activemq.version} - - - ${activemq.port1}:${activemq.port1} - ${activemq.port2}:${activemq.port2} - - - - - ${skip.integrationtests} - - - - start - pre-integration-test - - start - - - - stop - post-integration-test - - stop - - - -