Skip to content

Commit

Permalink
Merge pull request #8 from xenit-eu/master
Browse files Browse the repository at this point in the history
Release 2.0.1
  • Loading branch information
vierbergenlars authored Mar 12, 2020
2 parents f306c03 + 7e540a9 commit ff64e7a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 32 deletions.
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: java
dist: trusty
cache:
directories:
- "$HOME/.gradle"
matrix:
include:
- os: linux
Expand All @@ -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/+qyePW1qDubm0ZvNA1nFSZbIyjAD2gNu9XyqmyDfrJxEUgOx2xfOJWjp7flZpyZaHJ7FnMJFBckP1BSz6Gf8sPo7wX49s5fa3YIU16R6UhS9mrmcekp+MyESYTaK5bO5+mh+RAsEQXY2V4039Myoz705z2F1hSV81bwjhQgrTvYu7CuwSKPGAnXYwyp6/oki0xtTV+rucvqD0nWIN/5MXzEXA/0w/l6i4EiJ5Ewce890zq94fFhq52xcwMN2wbxi1UW8MfhScObTOE5dBJOlGNHhM4LakWymnBUoE6jc0D6NITN+CBwSgemz7yfuhsMYSk63cML9msKCxZ3+M/95JB6jGFKHYGjrSehWpO8pOxF/JiZja1f2bZFa0FGrv2NCN+zym7ggZ3PKENu+DSoqiH4kLC0HZ9AGx3vbRMl5H87gv7F8eF7drfw4OnTgU=
- secure: Itiga+qs20Mzb3koESOH7ONT8aHwx5F1e/4nPtVlMZEG9YLgOaKC8IMQ0+ozbY2Z28jvEbFIok7SoCaXvO1A0H1HobKRphqA7hKOuMHxcAylTdHS8oVsL7H4NAeRn84RxXMSaEhSfrJq4uYARrOOFK/c85xDIsShxoucCYMPmyiQKpDwP3E5RXhwRM1FoBDrxCwsb/C2adbPMZCO0RnMs6jS1G60An1UPZiOEqmZ0/uWE2Xmqfmnl/VdZ55lOTfMT0NMS5Yd4DYk/R4v8twN0WdtZ4sinciCCibTAYFHnBKj0THUAKke/mvUVpdVieFreCZbR2QN9ngZw3sRr+3rUYNjx4B4ukRfzYaNSS0aXH5eGXq6Db3ogAXQD/Shqziq6n4ll4c5KaXlNMFMLI5yWfIOTub/vcUbTvmOOPrwqq+asZKBfdcMDpOT83vF2qnF4dhId2I7IXpQngaC7RTrZ2lMdNsBkzaS3DaD8UPSx2yYZPhxZyeA56ZR3O5+Bl6GExXVGAyYgn5sM25UCdR7VdqkU/ADqesGQfwHwMpxtck6fX1XFMKehwgB9HGpB81i5ZBBkzPFn6gsVlvEtrHN+F9i+/jcMFaBLuIrgduH7LMqMPQQwdFV569YJHls/RnFpdF+bQ7oVsv3LG+W0EX5wrncaAnqOKfk/eY+OFC0iHs=
deploy:
skip_cleanup: true
provider: script
on:
branch: release
script: ./gradlew publish
36 changes: 13 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -13,7 +14,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)
Expand All @@ -24,53 +25,42 @@ 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}"
alfrescoProvided ("org.alfresco:alfresco-repository:${alfrescoVersion}") {
exclude group: "org.springframework.social"
}

/* 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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});

Expand Down Expand Up @@ -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");

Expand Down
5 changes: 2 additions & 3 deletions src/test/resources/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ff64e7a

Please sign in to comment.