diff --git a/pom.xml b/pom.xml index a52b878775..6aae1a9195 100644 --- a/pom.xml +++ b/pom.xml @@ -258,32 +258,26 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} - - - - ${image.name} - - ${project.basedir}/ - - - - + docker-maven-plugin + ${fabric8.docker.version} build-image - install - - build - - - - build-image-verify + verify build + + + + ${image.name} + + ${project.basedir}/ + + + + @@ -300,19 +294,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} - - - - ${image.name}:${image.tag} - ${image.registry} - - ${project.basedir}/ - - - - + docker-maven-plugin + ${fabric8.docker.version} build-push-image @@ -321,6 +304,17 @@ build push + + + + ${image.name}:${image.tag} + ${image.registry} + + ${project.basedir}/ + + + + @@ -338,25 +332,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} - - - - ${image.name}:${image.tag} - ${image.registry} - - ${project.basedir}/ - - - - ${image.name}:${image.tag} - - ${project.basedir}/ - - - - + docker-maven-plugin + ${fabric8.docker.version} build-push-image @@ -365,6 +342,23 @@ build push + + + + ${image.name}:${image.tag} + ${image.registry} + + ${project.basedir}/ + + + + ${image.name}:${image.tag} + + ${project.basedir}/ + + + + @@ -382,19 +376,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} - - - - ${image.name}:${project.version} - ${image.registry} - - ${project.basedir}/ - - - - + docker-maven-plugin + ${fabric8.docker.version} build-push-image @@ -403,6 +386,17 @@ build push + + + + ${image.name}:${project.version} + ${image.registry} + + ${project.basedir}/ + + + + @@ -420,25 +414,8 @@ io.fabric8 - fabric8-maven-plugin - ${fabric8.maven.version} - - - - ${image.name}:${project.version} - ${image.registry} - - ${project.basedir}/ - - - - ${image.name}:${project.version} - - ${project.basedir}/ - - - - + docker-maven-plugin + ${fabric8.docker.version} build-push-image @@ -447,6 +424,93 @@ build push + + + + ${image.name}:${project.version} + ${image.registry} + + ${project.basedir}/ + + + + ${image.name}:${project.version} + + ${project.basedir}/ + + + + + + + + + + + + + start-db + + + skip.integrationtests + false + + + + + + + io.fabric8 + docker-maven-plugin + ${fabric8.docker.version} + + + start + pre-integration-test + + 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 + post-integration-test + + stop + @@ -484,8 +548,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 @@ -520,7 +586,6 @@ ** src/test/properties/local - 3.5.37 imageNameNotSet latest quay.io @@ -603,13 +668,17 @@ - [1.8.0,) + [${java.version},) + + org.apache.maven.plugins + maven-compiler-plugin + org.codehaus.mojo build-helper-maven-plugin @@ -838,8 +907,8 @@ maven-compiler-plugin ${maven.compiler.version} - ${maven.build.sourceVersion} - ${maven.build.sourceVersion} + ${maven.compiler.source} + ${maven.compiler.target} @@ -849,8 +918,8 @@ testCompile - ${maven.build.testSourceVersion} - ${maven.build.testSourceVersion} + ${testJavaVersion} + ${testJavaVersion} @@ -945,7 +1014,7 @@ maven-javadoc-plugin none - 8 + ${java.version} @@ -1119,62 +1188,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 - - - - 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 8f69841258..7d69380667 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -12,12 +12,12 @@ - 1.8 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 +56,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 +102,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(), diff --git a/rm-community/rm-community-repo/pom.xml b/rm-community/rm-community-repo/pom.xml index 7afc80a480..570059ae2b 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,24 @@ io.fabric8 - fabric8-maven-plugin + docker-maven-plugin + + + + + + start-db + + + skip.integrationtests + false + + + + + + io.fabric8 + docker-maven-plugin 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