From e7d6908242eaf786c89eaf3e1a11e8b63e6433b9 Mon Sep 17 00:00:00 2001 From: Lars Vierbergen Date: Fri, 13 Dec 2019 16:16:36 +0100 Subject: [PATCH 1/3] Prepare for next release cycle (#6) --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 46e072c..122f0d1 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ description = 'Remote-jodconverter amp for Alfresco' group = 'eu.xenit.transformers' sourceCompatibility = '1.8' -def baseVersion = '2.0.0' +def baseVersion = '2.0.1' def branchName = System.env.TRAVIS_BRANCH def isRelease = branchName != null && branchName.startsWith("release") if (isRelease) From e1a0c37eaf998db763dccd3ab8387384efa2b4c9 Mon Sep 17 00:00:00 2001 From: rawiabenhmida <54401598+rawiabenhmida@users.noreply.github.com> Date: Wed, 11 Mar 2020 09:08:23 +0100 Subject: [PATCH 2/3] JODCONV-8 changing the default value of a endpoint to the entered value (#7) * JODCONV-8 changing the defualt value of a endpoint to the entred value * JODCONV-8 excluding spring.framework.social from alfresco dependencies --- build.gradle | 4 +++- .../transform/RemoteJODConverterContentTransformer.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 122f0d1..ab12cf5 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,9 @@ tasks.withType(JavaCompile) { ext.alfrescoVersion = "5.1.g" dependencies { - alfrescoProvided "org.alfresco:alfresco-repository:${alfrescoVersion}" + alfrescoProvided ("org.alfresco:alfresco-repository:${alfrescoVersion}") { + exclude group: "org.springframework.social" + } /* Alfresco with remote jod converter amp docker image */ alfrescoAmp files(project.amp) diff --git a/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java b/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java index 7f436c0..9e21711 100644 --- a/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java +++ b/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java @@ -114,7 +114,7 @@ protected void transformInternal(ContentReader reader, ContentWriter writer, Tra InputStream is = reader.getContentInputStream(); - Multipart part = new Multipart(DEFAULT_JODCONVERTER_ENDPOINT, "UTF-8"); + Multipart part = new Multipart(endpoint, "UTF-8"); part.addInputStreamPart("inputFile", is, sourceMimeType); part.addFormFieldWithoutEnding("outputFormat", "pdf"); From 7e540a9db952a2bb749d13bccb5cb376b5f95b09 Mon Sep 17 00:00:00 2001 From: Lars Vierbergen Date: Thu, 12 Mar 2020 15:22:33 +0100 Subject: [PATCH 3/3] Fix travis release procedure (#9) * Only perform a publish from the release branch, run check in all other cases * Let check task to a composeUp/Down for a smoketest * Update eu.xenit.amp to 1.0.1 --- .travis.yml | 11 ++++--- build.gradle | 30 ++++++------------- .../RemoteJODConverterContentTransformer.java | 2 +- src/test/resources/docker-compose.yml | 5 ++-- 4 files changed, 19 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index c4e6219..7b98e49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ language: java dist: trusty -cache: - directories: - - "$HOME/.gradle" matrix: include: - os: linux @@ -15,8 +12,14 @@ matrix: - chmod +x ./gradlew - openssl aes-256-cbc -K $encrypted_c6215021d27f_key -iv $encrypted_c6215021d27f_iv -in secring.gpg.enc -out secring.gpg -d script: - - "./gradlew publish" + - ./gradlew check env: global: - secure: zLKKzus1ECXxgBPXgy4r4v1j5Ix0xubj6n9YEIyIGi+/+ZLTMJSAGBAxh+vJh1VvntaxOc+fgfSqfyetvPIuW6JlPQEQoNJzMBVN+voNAh25OpQ6goOiL6XqL66SbAfEvXRXBLQ1c1p9wHo9fWFlsueFp5cyOdfwE60oBsvAs0PqrxMnSA4vs/4qDwpS3V2qfkVtYGAErDXWJcRH97I4/ABBs+IbRCvFUd5fuYMGj7PTt/+qyePW1qDubm0ZvNA1nFSZbIyjAD2gNu9XyqmyDfrJxEUgOx2xfOJ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deploy: + skip_cleanup: true + provider: script + on: + branch: release + script: ./gradlew publish diff --git a/build.gradle b/build.gradle index ab12cf5..84ace6b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,9 @@ plugins { id 'java' - id 'eu.xenit.amp' version '0.2.0' - id 'eu.xenit.alfresco' version '0.2.0' - id 'eu.xenit.docker-alfresco' version '4.0.2' + id 'eu.xenit.amp' version '1.0.1' + id 'eu.xenit.alfresco' version '1.0.1' + id 'eu.xenit.docker-alfresco' version '5.0.4' + id 'eu.xenit.docker-compose' version '5.0.4' id 'io.codearte.nexus-staging' version '0.21.0' // see https://github.com/Codearte/gradle-nexus-staging-plugin id 'maven-publish' id 'signing' @@ -24,16 +25,14 @@ else repositories { mavenCentral() - maven { - url "https://artifacts.alfresco.com/nexus/content/groups/public/" - } + alfrescoPublic() } tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } -ext.alfrescoVersion = "5.1.g" +ext.alfrescoVersion = "5.1.e" dependencies { alfrescoProvided ("org.alfresco:alfresco-repository:${alfrescoVersion}") { @@ -43,36 +42,25 @@ dependencies { /* Alfresco with remote jod converter amp docker image */ alfrescoAmp files(project.amp) baseAlfrescoWar "org.alfresco:alfresco:${alfrescoVersion}@war" - baseShareWar "org.alfresco:share:${alfrescoVersion}@war" } dockerAlfresco { // will need first to make these public - baseImage = "hub.xenit.eu/alfresco-community:${alfrescoVersion}" + baseImage = "xenit/alfresco-repository-community:${alfrescoVersion}" // current base images have already a version of jodconverter amp, therefore delete that first (leanImage=false) leanImage = false dockerBuild { - repository = 'xeniteu/alfresco-remote-jodconverter-test' + repository = 'alfresco-remote-jodconverter-test' automaticTags = true } } dockerCompose { useComposeFiles = ["${project.projectDir}/src/test/resources/docker-compose.yml"] -} - -task openUrlInBrowser { - dependsOn 'composeUp' - doLast { - def serviceInfo = getTasks().getByName("composeUp").getServicesInfos().get("alfresco-core") - def host = serviceInfo.getHost() - def port = serviceInfo.getPort() - java.awt.Desktop.desktop.browse "http://$host:$port/share".toURI() - } - + isRequiredBy(check) } task sourcesJar(type: Jar, dependsOn: classes) { diff --git a/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java b/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java index 9e21711..858922d 100644 --- a/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java +++ b/src/main/java/eu/xenit/transformers/content/transform/RemoteJODConverterContentTransformer.java @@ -44,7 +44,7 @@ public class RemoteJODConverterContentTransformer extends AbstractContentTransfo MIMETYPE_TEXT_RICHTEXT, MimetypeMap.MIMETYPE_HTML, MimetypeMap.MIMETYPE_XHTML, MimetypeMap.MIMETYPE_TEXT_PLAIN, - MimetypeMap.MIMETYPE_VISIO,MimetypeMap.MIMETYPE_VISIO_2013, + MimetypeMap.MIMETYPE_VISIO,"application/vnd.visio2013", // visio2013 is not present in the MimeTypeMap in Alfresco 5.1.e MimetypeMap.MIMETYPE_IMAGE_TIFF, MimetypeMap.MIMETYPE_EXCEL}); diff --git a/src/test/resources/docker-compose.yml b/src/test/resources/docker-compose.yml index b0e66b0..7ed1598 100644 --- a/src/test/resources/docker-compose.yml +++ b/src/test/resources/docker-compose.yml @@ -13,14 +13,13 @@ services: # - CATALINA_OPTS=-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 postgresql: - image: xeniteu/postgres + image: xenit/postgres environment: - POSTGRES_USER=alfresco - POSTGRES_PASSWORD=admin - POSTGRES_DB=alfresco jodconverter: - # TO DO: replace with public image once available - image: xeniteu/jodconverter:4.2.3-SNAPSHOT + image: xenit/jodconverter:4.2.3-SNAPSHOT ports: - 8080