From 5334623e5687da466414ddea067135d20fa47c13 Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Mon, 9 Sep 2019 12:55:32 +0300 Subject: [PATCH 01/18] add tests to Bulk Remove from Hold --- .../rm/community/recordcategories/AutomaticDispositionTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java index c4c6c78f40..468f5e5194 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java @@ -57,7 +57,7 @@ public class AutomaticDispositionTest extends BaseRMRestTest * When the correct duration of time passes * Then the record will be automatically cut off */ - @Test(enabled = false) + @Test//(enabled = false) public void testAutomaticCutOff() throws Exception { STEP("Create record category with retention schedule and apply it to records."); From 3c957afdbe2cba36dbac6af9f68a902d8f3a190a Mon Sep 17 00:00:00 2001 From: Rodica Sutu Date: Mon, 9 Sep 2019 13:31:35 +0300 Subject: [PATCH 02/18] remove unwanted changes --- .../rm/community/recordcategories/AutomaticDispositionTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java index 468f5e5194..c4c6c78f40 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/recordcategories/AutomaticDispositionTest.java @@ -57,7 +57,7 @@ public class AutomaticDispositionTest extends BaseRMRestTest * When the correct duration of time passes * Then the record will be automatically cut off */ - @Test//(enabled = false) + @Test(enabled = false) public void testAutomaticCutOff() throws Exception { STEP("Create record category with retention schedule and apply it to records."); From b8963f75c8ebd852e86ed4db9708348ef4d5fb86 Mon Sep 17 00:00:00 2001 From: Ramona Popa Date: Mon, 9 Sep 2019 22:10:55 +0300 Subject: [PATCH 03/18] RM-6945: Display available actions on held active content inside a hold - added actions for isFreezeActiveContent --- .../rm-ui-evaluators-context.xml | 1 + .../jscript/app/JSONConversionComponent.java | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml index aeeb7699de..82af26b3cd 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml @@ -24,6 +24,7 @@ + diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index f6a60aa796..40525d4486 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -46,6 +46,7 @@ import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService import org.alfresco.module.org_alfresco_module_rm.event.EventCompletionDetails; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; +import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService; import org.alfresco.module.org_alfresco_module_rm.hold.HoldService; import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; import org.alfresco.module.org_alfresco_module_rm.record.RecordService; @@ -89,6 +90,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS private static final String RECORD_CONTRIBUTOR_GROUP_NAME = "recordContributorGroupName"; private static final String IS_VISIBLE_FOR_CURRENT_USER = "isVisibleForCurrentUser"; private static final String IS_ANY_HOLD_VISIBLE_FOR_CURRENT_USER = "isHoldVisibleForCurrentUser"; + private static final String IS_FROZEN_ACTIVE_CONTENT = "isFrozenActiveContent"; /** true if record contributor group is enabled, false otherwise */ private boolean isRecordContributorsGroupEnabled = false; @@ -114,6 +116,9 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS /** site service */ private SiteService siteService; + /** freeze service */ + private FreezeService freezeService; + /** * Disposition service */ @@ -277,6 +282,12 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS this.holdService = holdService; } + /** + * + * @param freezeService + */ + public void setFreezeService(FreezeService freezeService) { this.freezeService = freezeService; } + /** * The initialise method */ @@ -354,6 +365,10 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS break; } } + if (freezeService.isFrozen(nodeRef)) + { + rootJSONObject.put(IS_FROZEN_ACTIVE_CONTENT, true); + } } } } From cb4c0ef37fc4592cce844f221fac4a96df4f658f Mon Sep 17 00:00:00 2001 From: Ramona Popa Date: Tue, 10 Sep 2019 23:00:53 +0300 Subject: [PATCH 04/18] RM-6945: Display available actions on held active content inside a hold - allow method to be executed by non rm --- .../module/org_alfresco_module_rm/rm-service-context.xml | 2 +- .../jscript/app/JSONConversionComponent.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml index 7b7a037aa7..1ae4de9564 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml @@ -908,7 +908,7 @@ holds = holdService.heldBy(nodeRef, false); if (!CollectionUtils.isEmpty(holds)) { @@ -365,10 +370,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS break; } } - if (freezeService.isFrozen(nodeRef)) - { - rootJSONObject.put(IS_FROZEN_ACTIVE_CONTENT, true); - } } } } From 7a8273645da4234e2f9f5c92a669c93b60186938 Mon Sep 17 00:00:00 2001 From: Ramona Popa Date: Wed, 11 Sep 2019 11:23:53 +0300 Subject: [PATCH 05/18] RM-6945: Display available actions on held active content inside a hold - reverted allow method to be executed by non rm --- .../org_alfresco_module_rm/rm-ui-evaluators-context.xml | 2 +- .../jscript/app/JSONConversionComponent.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml index 82af26b3cd..b849d1048a 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml @@ -24,7 +24,7 @@ - + diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index 75fdcbb0b8..0223a57656 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -317,6 +317,8 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS // Set the base root values super.setRootValues(nodeInfo, rootJSONObject, useShortQNames); + rootJSONObject.put("uiType", getUIType(nodeInfo.getNodeRef())); + // check the existence of the RM site checkRmSiteExistence(rootJSONObject); @@ -632,6 +634,11 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS { String result = "unknown"; + if (freezeService.isFrozen(nodeRef)) + { + return "frozencontent"; + } + FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef); if (kind != null) { @@ -699,7 +706,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS } } } - return result; } From 48d8f66046dfac3023054bf6baaf844300745edd Mon Sep 17 00:00:00 2001 From: Ramona Popa Date: Wed, 11 Sep 2019 16:26:56 +0300 Subject: [PATCH 06/18] RM-6945: Display available actions on held active content inside a hold - added uiType frozen content --- .../jscript/app/JSONConversionComponent.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index 0223a57656..2b9d62330c 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -90,7 +90,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS private static final String RECORD_CONTRIBUTOR_GROUP_NAME = "recordContributorGroupName"; private static final String IS_VISIBLE_FOR_CURRENT_USER = "isVisibleForCurrentUser"; private static final String IS_ANY_HOLD_VISIBLE_FOR_CURRENT_USER = "isHoldVisibleForCurrentUser"; - private static final String IS_FROZEN_ACTIVE_CONTENT = "isFrozenActiveContent"; /** true if record contributor group is enabled, false otherwise */ private boolean isRecordContributorsGroupEnabled = false; @@ -355,11 +354,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS } } - if (freezeService.isFrozen(nodeRef)) - { - rootJSONObject.put(IS_FROZEN_ACTIVE_CONTENT, true); - } - List holds = holdService.heldBy(nodeRef, false); if (!CollectionUtils.isEmpty(holds)) { @@ -636,7 +630,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS if (freezeService.isFrozen(nodeRef)) { - return "frozencontent"; + result = "frozencontent"; } FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef); From 50f2457a52b21c2ea81c18769f745182dde1f338 Mon Sep 17 00:00:00 2001 From: Ramona Popa Date: Thu, 12 Sep 2019 16:21:23 +0300 Subject: [PATCH 07/18] RM-6945: Display available actions on held active content inside a hold - fixed actions --- .../jscript/app/JSONConversionComponent.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index 2b9d62330c..6405510dde 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -628,11 +628,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS { String result = "unknown"; - if (freezeService.isFrozen(nodeRef)) - { - result = "frozencontent"; - } - FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef); if (kind != null) { @@ -700,6 +695,10 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS } } } + else if (freezeService.isFrozen(nodeRef)) + { + result = "frozencontent"; + } return result; } From a2be7a29f9a534ef6c0c098a5cc702064d2f8f02 Mon Sep 17 00:00:00 2001 From: Ramona Popa Date: Fri, 13 Sep 2019 08:59:59 +0300 Subject: [PATCH 08/18] RM-6945: Display available actions on held active content inside a hold - updated actions --- .../module/org_alfresco_module_rm/rm-service-context.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml index 1ae4de9564..00e1ccddaf 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml @@ -908,7 +908,7 @@ Date: Fri, 13 Sep 2019 10:12:39 +0300 Subject: [PATCH 09/18] RM-6945: Display available actions on held active content inside a hold - updated actions for document library --- .../jscript/app/JSONConversionComponent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java index a57511a4a7..2a3cda9067 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java @@ -89,6 +89,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS private static final String RECORD_CONTRIBUTOR_GROUP_NAME = "recordContributorGroupName"; private static final String IS_VISIBLE_FOR_CURRENT_USER = "isVisibleForCurrentUser"; private static final String IS_ADD_TO_HOLD_VISIBLE = "isAddToHoldVisible"; + private static final String FROZEN_ACTIVE_CONTENT = "frozencontent"; /** true if record contributor group is enabled, false otherwise */ private boolean isRecordContributorsGroupEnabled = false; @@ -676,7 +677,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS } else if (freezeService.isFrozen(nodeRef)) { - result = "frozencontent"; + result = FROZEN_ACTIVE_CONTENT; } return result; } From 7dd104c28e2e4796bc500328f60979c9453fc4c3 Mon Sep 17 00:00:00 2001 From: Meenal Bhave Date: Wed, 18 Sep 2019 09:52:53 +0100 Subject: [PATCH 10/18] Search-1835: Updated GS Automation to use TAS Rest API Version 6.0.1.2, to be used with IE automation --- .../rm-automation-community-rest-api/pom.xml | 20 ++++++++++++++++++- .../org/alfresco/rest/core/RMRestWrapper.java | 2 +- .../community/requests/gscore/GSCoreAPI.java | 2 +- .../requests/gscore/api/RMUserAPI.java | 14 ++++++------- .../requests/gscore/api/RecordFolderAPI.java | 4 ++-- .../requests/gscore/api/RecordsAPI.java | 3 ++- .../gscore/api/UnfiledContainerAPI.java | 5 +++-- .../gscore/api/UnfiledRecordFolderAPI.java | 4 ++-- .../services/javax.ws.rs.client.ClientBuilder | 1 + .../files/DeclareDocumentAsRecordTests.java | 2 +- .../rm/community/hold/AddToHoldsTests.java | 6 +++--- .../community/hold/RemoveFromHoldsTests.java | 10 +++++----- .../community/records/DeleteRecordTests.java | 8 ++++---- 13 files changed, 51 insertions(+), 30 deletions(-) create mode 100644 rm-automation/rm-automation-community-rest-api/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index 8f69841258..a8341706ab 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -16,8 +16,9 @@ false alfresco-governance-services-community-share alfresco-governance-services-community-repo - 6.0.0.3 + 6.0.1.2 2.0.0 + 2.7.7 @@ -56,12 +57,24 @@ org.alfresco.tas restapi-test ${tas.restapi.version} + + + com.fasterxml.jackson.core + jackson-databind + + org.alfresco.tas restapi-test ${tas.restapi.version} test-jar + + + com.fasterxml.jackson.core + jackson-databind + + org.projectlombok @@ -90,5 +103,10 @@ docker-java 3.0.14 + + com.fasterxml.jackson.core + jackson-databind + ${jackson.databind.version} + diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java index 538f089537..aa208853ca 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RMRestWrapper.java @@ -26,7 +26,7 @@ */ package org.alfresco.rest.core; -import com.jayway.restassured.builder.RequestSpecBuilder; +import io.restassured.builder.RequestSpecBuilder; import org.alfresco.rest.exception.EmptyJsonResponseException; import org.alfresco.rest.model.RestErrorModel; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/GSCoreAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/GSCoreAPI.java index 063eb03b43..38cb06ef25 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/GSCoreAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/GSCoreAPI.java @@ -29,7 +29,7 @@ package org.alfresco.rest.rm.community.requests.gscore; import static java.lang.Integer.parseInt; import static java.lang.String.format; -import com.jayway.restassured.RestAssured; +import io.restassured.RestAssured; import org.alfresco.rest.core.RMRestProperties; import org.alfresco.rest.core.RMRestWrapper; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java index a2f84b8a91..185efd49de 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java @@ -26,17 +26,17 @@ */ package org.alfresco.rest.rm.community.requests.gscore.api; -import static com.jayway.restassured.RestAssured.basic; -import static com.jayway.restassured.RestAssured.given; - import static org.jglue.fluentjson.JsonBuilderFactory.buildObject; import static org.springframework.http.HttpStatus.OK; import com.google.gson.JsonObject; -import com.jayway.restassured.builder.RequestSpecBuilder; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.response.Response; -import com.jayway.restassured.specification.RequestSpecification; + +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.http.ContentType; +import io.restassured.response.Response; +import io.restassured.specification.RequestSpecification; +import static io.restassured.RestAssured.basic; +import static io.restassured.RestAssured.given; import org.alfresco.dataprep.AlfrescoHttpClient; import org.alfresco.dataprep.AlfrescoHttpClientFactory; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java index 3f37d0f5ec..00aeaaf86c 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordFolderAPI.java @@ -45,8 +45,8 @@ import java.util.Iterator; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.jayway.restassured.builder.RequestSpecBuilder; -import com.jayway.restassured.http.ContentType; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.http.ContentType; import org.alfresco.rest.core.RMRestWrapper; import org.alfresco.rest.rm.community.model.record.Record; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java index 9d2f5bfe06..8de57fbeca 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RecordsAPI.java @@ -37,13 +37,14 @@ import static org.springframework.http.HttpMethod.GET; import static org.springframework.http.HttpMethod.POST; import static org.springframework.http.HttpMethod.PUT; -import com.jayway.restassured.response.ResponseBody; import org.alfresco.rest.core.RMRestWrapper; import org.alfresco.rest.rm.community.model.record.Record; import org.alfresco.rest.rm.community.model.record.RecordBodyFile; import org.alfresco.rest.rm.community.requests.RMModelRequest; +import io.restassured.response.ResponseBody; + /** * Records REST API Wrapper * diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java index 6faedce34b..a688fcfe43 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledContainerAPI.java @@ -44,8 +44,9 @@ import java.util.Iterator; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.jayway.restassured.builder.RequestSpecBuilder; -import com.jayway.restassured.http.ContentType; + +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.http.ContentType; import org.alfresco.rest.core.RMRestWrapper; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainer; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java index 364575619d..6210531390 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/UnfiledRecordFolderAPI.java @@ -45,8 +45,8 @@ import java.util.Iterator; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.jayway.restassured.builder.RequestSpecBuilder; -import com.jayway.restassured.http.ContentType; +import io.restassured.builder.RequestSpecBuilder; +import io.restassured.http.ContentType; import org.alfresco.rest.core.RMRestWrapper; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild; diff --git a/rm-automation/rm-automation-community-rest-api/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder b/rm-automation/rm-automation-community-rest-api/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder new file mode 100644 index 0000000000..48b9fa5717 --- /dev/null +++ b/rm-automation/rm-automation-community-rest-api/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder @@ -0,0 +1 @@ +org.glassfish.jersey.client.JerseyClientBuilder \ No newline at end of file diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareDocumentAsRecordTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareDocumentAsRecordTests.java index af871ccabe..c77934c60a 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareDocumentAsRecordTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareDocumentAsRecordTests.java @@ -261,7 +261,7 @@ public class DeclareDocumentAsRecordTests extends BaseRMRestTest public void declareAsRecordAFileWithARecordVersion() throws Exception { STEP("Create a file."); - FileModel testFile = dataContent.usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FileModel testFile = dataContent.usingAdmin().usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); STEP("Declare file version as record and check that record is successfully created."); recordsAPI.declareDocumentVersionAsRecord(getAdminUser().getUsername(), getAdminUser().getPassword(), testSite.getId(), diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java index c8f7d6c3ac..bdd9f6f9bf 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/AddToHoldsTests.java @@ -116,11 +116,11 @@ public class AddToHoldsTests extends BaseRMRestTest STEP("Create test files."); testSite = dataSite.usingAdmin().createPublicRandomSite(); - documentHeld = dataContent.usingSite(testSite) + documentHeld = dataContent.usingAdmin().usingSite(testSite) .createContent(CMISUtil.DocumentType.TEXT_PLAIN); - contentToAddToHold = dataContent.usingSite(testSite) + contentToAddToHold = dataContent.usingAdmin().usingSite(testSite) .createContent(CMISUtil.DocumentType.TEXT_PLAIN); - contentAddToHoldNoPermission = dataContent.usingSite(testSite) + contentAddToHoldNoPermission = dataContent.usingAdmin().usingSite(testSite) .createContent(CMISUtil.DocumentType.TEXT_PLAIN); STEP("Add the content to the hold."); diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java index 6021842bc2..c23b244b7d 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/hold/RemoveFromHoldsTests.java @@ -106,7 +106,7 @@ public class RemoveFromHoldsTests extends BaseRMRestTest STEP("Create test files."); testSite = dataSite.usingAdmin().createPublicRandomSite(); privateSite = dataSite.usingAdmin().createPrivateRandomSite(); - contentHeld = dataContent.usingSite(testSite) + contentHeld = dataContent.usingAdmin().usingSite(testSite) .createContent(CMISUtil.DocumentType.TEXT_PLAIN); contentAddToManyHolds = dataContent.usingSite(testSite) .createContent(CMISUtil.DocumentType.TEXT_PLAIN); @@ -212,9 +212,9 @@ public class RemoveFromHoldsTests extends BaseRMRestTest UserModel user = roleService.createUserWithRMRole(ROLE_RM_MANAGER.roleId); getRestAPIFactory().getRMUserAPI().addUserPermission(holdNodeRefOne, user, PERMISSION_FILING); //create files that will be removed from hold - FileModel contentNoHoldPerm = dataContent.usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); - FileModel contentNoHoldCap = dataContent.usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); - FileModel privateFile = dataContent.usingSite(privateSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FileModel contentNoHoldPerm = dataContent.usingAdmin().usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FileModel contentNoHoldCap = dataContent.usingAdmin().usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FileModel privateFile = dataContent.usingAdmin().usingSite(privateSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); //add files to hold holdsAPI.addItemsToHolds(getAdminUser().getUsername(), getAdminUser().getPassword(), asList(recordFolder.getId(), contentNoHoldCap.getNodeRefWithoutVersion(), @@ -288,7 +288,7 @@ public class RemoveFromHoldsTests extends BaseRMRestTest PERMISSION_READ_RECORDS); getRestAPIFactory().getRMUserAPI().addUserPermission(holdNodeRefOne, user, PERMISSION_FILING); //create file that will be removed from hold - FileModel contentPermission = dataContent.usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FileModel contentPermission = dataContent.usingAdmin().usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); //add files to hold holdsAPI.addItemsToHolds(getAdminUser().getUsername(), getAdminUser().getPassword(), diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/DeleteRecordTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/DeleteRecordTests.java index bc88c6a6d6..0be5edc8f9 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/DeleteRecordTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/DeleteRecordTests.java @@ -317,7 +317,7 @@ public class DeleteRecordTests extends BaseRMRestTest { STEP("Create a file."); testSite = dataSite.usingAdmin().createPublicRandomSite(); - FileModel testFile = dataContent.usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FileModel testFile = dataContent.usingAdmin().usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); STEP("Create a copy of the file."); RestNodeModel copyOfTestFile = copyNode(testFile.getNodeRefWithoutVersion(), testSite.getGuid()); @@ -352,8 +352,8 @@ public class DeleteRecordTests extends BaseRMRestTest { STEP("Create a file."); testSite = dataSite.usingAdmin().createPublicRandomSite(); - FileModel testFile = dataContent.usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); - FolderModel folderModel = dataContent.usingSite(testSite).createFolder(); + FileModel testFile = dataContent.usingAdmin().usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FolderModel folderModel = dataContent.usingAdmin().usingSite(testSite).createFolder(); STEP("Create a copy of the file."); RestNodeModel copy = copyNode(testFile.getNodeRefWithoutVersion(), folderModel.getNodeRefWithoutVersion()); @@ -406,7 +406,7 @@ public class DeleteRecordTests extends BaseRMRestTest { STEP("Create a file."); testSite = dataSite.usingAdmin().createPublicRandomSite(); - FileModel testFile = dataContent.usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); + FileModel testFile = dataContent.usingAdmin().usingSite(testSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN); STEP("Declare file version as record."); recordsAPI.declareDocumentVersionAsRecord(getAdminUser().getUsername(), getAdminUser().getPassword(), testSite.getId(), From c2a27f63704a6a849dc41efd6b28b8f6784aa051 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Fri, 20 Sep 2019 16:00:11 +0100 Subject: [PATCH 11/18] Set declared Java version to 11. This should ensure that IDEs default to the correct Java version. --- pom.xml | 22 ++++++++++++------- rm-automation/pom.xml | 2 -- .../rm-automation-community-rest-api/pom.xml | 1 - .../rm-community-rest-api-explorer/pom.xml | 2 -- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index a52b878775..b64a19a1cb 100644 --- a/pom.xml +++ b/pom.xml @@ -484,8 +484,10 @@ true 3.2.2 false - 1.8 - 1.8 + 11 + ${java.version} + ${java.version} + ${java.version} 1.9.1 3.8.0 3.0.0-M2 @@ -603,13 +605,17 @@ - [1.8.0,) + [${java.version},) + + org.apache.maven.plugins + maven-compiler-plugin + org.codehaus.mojo build-helper-maven-plugin @@ -838,8 +844,8 @@ maven-compiler-plugin ${maven.compiler.version} - ${maven.build.sourceVersion} - ${maven.build.sourceVersion} + ${maven.compiler.source} + ${maven.compiler.target} @@ -849,8 +855,8 @@ testCompile - ${maven.build.testSourceVersion} - ${maven.build.testSourceVersion} + ${testJavaVersion} + ${testJavaVersion} @@ -945,7 +951,7 @@ maven-javadoc-plugin none - 8 + ${java.version} diff --git a/rm-automation/pom.xml b/rm-automation/pom.xml index 35107c17f2..ff77247a54 100644 --- a/rm-automation/pom.xml +++ b/rm-automation/pom.xml @@ -24,8 +24,6 @@ - 1.8 - 1.8 testng.xml true diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index a8341706ab..7d69380667 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -12,7 +12,6 @@ - 1.8 false alfresco-governance-services-community-share alfresco-governance-services-community-repo diff --git a/rm-community/rm-community-rest-api-explorer/pom.xml b/rm-community/rm-community-rest-api-explorer/pom.xml index d49cdd9616..6215245606 100644 --- a/rm-community/rm-community-rest-api-explorer/pom.xml +++ b/rm-community/rm-community-rest-api-explorer/pom.xml @@ -11,8 +11,6 @@ - 1.8 - 1.8 false UTF-8 UTF-8 From 067cae1cd2295b942e2ca1e056e05888bdc45d41 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Tue, 24 Sep 2019 15:50:59 +0100 Subject: [PATCH 12/18] Use docker-maven-plugin rather than fabric8-maven-plugin. This removes any attempts to connect to kubernetes clusters which can take considerable time. --- pom.xml | 21 ++++++++++----------- rm-community/rm-community-repo/pom.xml | 8 ++++---- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index a52b878775..2a741aca98 100644 --- a/pom.xml +++ b/pom.xml @@ -258,8 +258,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} + docker-maven-plugin + ${fabric8.docker.version} @@ -300,8 +300,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} + docker-maven-plugin + ${fabric8.docker.version} @@ -338,8 +338,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} + docker-maven-plugin + ${fabric8.docker.version} @@ -382,8 +382,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} + docker-maven-plugin + ${fabric8.docker.version} @@ -420,8 +420,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} + docker-maven-plugin + ${fabric8.docker.version} @@ -520,7 +520,6 @@ ** src/test/properties/local - 3.5.37 imageNameNotSet latest quay.io diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index 7afc80a480..a80c2f14ae 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -628,7 +628,7 @@ io.fabric8 - fabric8-maven-plugin + docker-maven-plugin @@ -639,7 +639,7 @@ io.fabric8 - fabric8-maven-plugin + docker-maven-plugin @@ -650,7 +650,7 @@ io.fabric8 - fabric8-maven-plugin + docker-maven-plugin @@ -661,7 +661,7 @@ io.fabric8 - fabric8-maven-plugin + docker-maven-plugin From df16478e532de0be1781250e44b75781d46e3a77 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Tue, 24 Sep 2019 16:26:34 +0100 Subject: [PATCH 13/18] 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 - - - - From 43c29299d1cdfac5a1d36a465b5d9d10a6dcd334 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 25 Sep 2019 09:07:18 +0100 Subject: [PATCH 14/18] Remove unused property. --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a502651ed..2a156061c9 100644 --- a/pom.xml +++ b/pom.xml @@ -555,7 +555,6 @@ 2.9.8 0.25.0 - . 1.10.19 42.2.5 5432 From 2cdfdf50373ce88c214435c35d22fe0775535447 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 25 Sep 2019 10:07:30 +0100 Subject: [PATCH 15/18] Build docker images during verify phase. This avoids needing to update the build plans, which expect the docker image to be built during the verify phase. --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2a156061c9..c62baa34a7 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,8 @@ build-image - install + + verify build From 4461495d85e727b5b06fa836249a525704052418 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 25 Sep 2019 10:20:13 +0100 Subject: [PATCH 16/18] Fix start/stop db to be in a pluginManagement section. --- pom.xml | 116 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/pom.xml b/pom.xml index c62baa34a7..730f833eab 100644 --- a/pom.xml +++ b/pom.xml @@ -457,63 +457,65 @@ - - - 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 - - - - - + + + + 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 + + + + + + From 8c16f9351fd1665fdd6de03f8bc6d2bec5e462eb Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 25 Sep 2019 11:41:54 +0100 Subject: [PATCH 17/18] Make all configuration execution specific. This introduces some duplication for the start/stop db executions, but I can't see any way to avoid that. We don't want the other configuration being shared between executions. Ensure the db start/stop execution triggers for repo and not for share. --- pom.xml | 234 ++++++++++++++----------- rm-community/rm-community-repo/pom.xml | 17 ++ 2 files changed, 151 insertions(+), 100 deletions(-) diff --git a/pom.xml b/pom.xml index 730f833eab..987c4f38e2 100644 --- a/pom.xml +++ b/pom.xml @@ -260,16 +260,6 @@ io.fabric8 docker-maven-plugin ${fabric8.docker.version} - - - - ${image.name} - - ${project.basedir}/ - - - - build-image @@ -278,6 +268,16 @@ build + + + + ${image.name} + + ${project.basedir}/ + + + + @@ -296,17 +296,6 @@ io.fabric8 docker-maven-plugin ${fabric8.docker.version} - - - - ${image.name}:${image.tag} - ${image.registry} - - ${project.basedir}/ - - - - build-push-image @@ -315,6 +304,17 @@ build push + + + + ${image.name}:${image.tag} + ${image.registry} + + ${project.basedir}/ + + + + @@ -334,23 +334,6 @@ io.fabric8 docker-maven-plugin ${fabric8.docker.version} - - - - ${image.name}:${image.tag} - ${image.registry} - - ${project.basedir}/ - - - - ${image.name}:${image.tag} - - ${project.basedir}/ - - - - build-push-image @@ -359,6 +342,23 @@ build push + + + + ${image.name}:${image.tag} + ${image.registry} + + ${project.basedir}/ + + + + ${image.name}:${image.tag} + + ${project.basedir}/ + + + + @@ -378,17 +378,6 @@ io.fabric8 docker-maven-plugin ${fabric8.docker.version} - - - - ${image.name}:${project.version} - ${image.registry} - - ${project.basedir}/ - - - - build-push-image @@ -397,6 +386,17 @@ build push + + + + ${image.name}:${project.version} + ${image.registry} + + ${project.basedir}/ + + + + @@ -416,23 +416,6 @@ io.fabric8 docker-maven-plugin ${fabric8.docker.version} - - - - ${image.name}:${project.version} - ${image.registry} - - ${project.basedir}/ - - - - ${image.name}:${project.version} - - ${project.basedir}/ - - - - build-push-image @@ -441,6 +424,23 @@ build push + + + + ${image.name}:${project.version} + ${image.registry} + + ${project.basedir}/ + + + + ${image.name}:${project.version} + + ${project.basedir}/ + + + + @@ -463,40 +463,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} - - - - - start @@ -504,6 +470,40 @@ start + + + + 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} + + + + + stop @@ -511,6 +511,40 @@ stop + + + + 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} + + + + + diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index a80c2f14ae..570059ae2b 100644 --- a/rm-community/rm-community-repo/pom.xml +++ b/rm-community/rm-community-repo/pom.xml @@ -666,5 +666,22 @@ + + start-db + + + skip.integrationtests + false + + + + + + io.fabric8 + docker-maven-plugin + + + + \ No newline at end of file From 0616a1070d53a6380bd519c7062edcedd56e1683 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 25 Sep 2019 13:51:11 +0100 Subject: [PATCH 18/18] Remove duplicate unnecessary configuration for stop db/amq. --- pom.xml | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/pom.xml b/pom.xml index 987c4f38e2..f3d85b5186 100644 --- a/pom.xml +++ b/pom.xml @@ -511,40 +511,6 @@ stop - - - - 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} - - - - -