From f646ed86bdab9e311d6b0c12d4a830b05adb523f Mon Sep 17 00:00:00 2001 From: alandavis Date: Mon, 8 Aug 2022 16:16:55 +0100 Subject: [PATCH] Fix build --- engines/aio/pom.xml | 4 +- .../alfresco/transform/aio/AIOTikaTest.java | 46 +++++++++++++++++-- engines/base/pom.xml | 1 + engines/example/pom.xml | 4 +- engines/imagemagick/pom.xml | 4 +- engines/libreoffice/pom.xml | 4 +- engines/misc/pom.xml | 4 +- .../org/alfresco/transform/misc/MiscTest.java | 15 ------ engines/pdfrenderer/pom.xml | 2 +- engines/pom.xml | 0 engines/tika/pom.xml | 4 +- .../org/alfresco/transform/tika/TikaTest.java | 2 +- pom.xml | 2 +- 13 files changed, 58 insertions(+), 34 deletions(-) create mode 100644 engines/pom.xml diff --git a/engines/aio/pom.xml b/engines/aio/pom.xml index d51484ee..eb48e3f2 100644 --- a/engines/aio/pom.xml +++ b/engines/aio/pom.xml @@ -5,10 +5,10 @@ - All-In-One - alfresco-transform-core org.alfresco - 2.6.1-SNAPSHOT + alfresco-transform-core ../../pom.xml + 2.6.1-SNAPSHOT diff --git a/engines/aio/src/test/java/org/alfresco/transform/aio/AIOTikaTest.java b/engines/aio/src/test/java/org/alfresco/transform/aio/AIOTikaTest.java index c546fd0a..bfc25ceb 100644 --- a/engines/aio/src/test/java/org/alfresco/transform/aio/AIOTikaTest.java +++ b/engines/aio/src/test/java/org/alfresco/transform/aio/AIOTikaTest.java @@ -6,13 +6,13 @@ * %% * This file is part of the Alfresco software. * - - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is + * If the software was purchased under a paid Alfresco license", "the terms of + * the paid license agreement will prevail. Otherwise", "the software is * provided under the following open source license terms: * - * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or + * the Free Software Foundation", "either version 3 of the License", "or * (at your option) any later version. * - * Alfresco is distributed in the hope that it will be useful, @@ -21,16 +21,54 @@ * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . + * along with Alfresco. If not", "see . * #L% */ package org.alfresco.transform.aio; +import com.google.common.collect.ImmutableSet; import org.alfresco.transform.tika.TikaTest; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Test Tika functionality in All-In-One. */ public class AIOTikaTest extends TikaTest { + @Test + public void optionListTest() + { + assertEquals(ImmutableSet.of( + "allowEnlargement", + "allowPdfEnlargement", + "alphaRemove", + "autoOrient", + "commandOptions", + "cropGravity", + "cropHeight", + "cropPercentage", + "cropWidth", + "cropXOffset", + "cropYOffset", + "endPage", + "extractMapping", + "height", + "includeContents", + "maintainAspectRatio", + "maintainPdfAspectRatio", + "metadata", + "notExtractBookmarksText", + "page", + "pageLimit", + "resizeHeight", + "resizePercentage", + "resizeWidth", + "startPage", + "targetEncoding", + "thumbnail", + "width"), + optionLister.getOptionNames(controller.transformConfig(0).getBody().getTransformOptions())); + } } \ No newline at end of file diff --git a/engines/base/pom.xml b/engines/base/pom.xml index a66fa849..a8558ca1 100644 --- a/engines/base/pom.xml +++ b/engines/base/pom.xml @@ -7,6 +7,7 @@ org.alfresco alfresco-transform-core + ../../pom.xml 2.6.1-SNAPSHOT diff --git a/engines/example/pom.xml b/engines/example/pom.xml index 08c2e52b..6dc219ea 100644 --- a/engines/example/pom.xml +++ b/engines/example/pom.xml @@ -5,10 +5,10 @@ - Example - alfresco-transform-core org.alfresco - 2.6.1-SNAPSHOT + alfresco-transform-core ../../pom.xml + 2.6.1-SNAPSHOT diff --git a/engines/imagemagick/pom.xml b/engines/imagemagick/pom.xml index 74089ba9..50230813 100644 --- a/engines/imagemagick/pom.xml +++ b/engines/imagemagick/pom.xml @@ -5,10 +5,10 @@ - ImageMagick - alfresco-transform-core org.alfresco - 2.6.1-SNAPSHOT + alfresco-transform-core ../../pom.xml + 2.6.1-SNAPSHOT diff --git a/engines/libreoffice/pom.xml b/engines/libreoffice/pom.xml index 18ca6954..df12803a 100644 --- a/engines/libreoffice/pom.xml +++ b/engines/libreoffice/pom.xml @@ -5,10 +5,10 @@ - LibreOffice - alfresco-transform-core org.alfresco - 2.6.1-SNAPSHOT + alfresco-transform-core ../../pom.xml + 2.6.1-SNAPSHOT diff --git a/engines/misc/pom.xml b/engines/misc/pom.xml index 62eadc1c..1a79959e 100644 --- a/engines/misc/pom.xml +++ b/engines/misc/pom.xml @@ -5,10 +5,10 @@ - Misc - alfresco-transform-core org.alfresco - 2.6.1-SNAPSHOT + alfresco-transform-core ../../pom.xml + 2.6.1-SNAPSHOT diff --git a/engines/misc/src/test/java/org/alfresco/transform/misc/MiscTest.java b/engines/misc/src/test/java/org/alfresco/transform/misc/MiscTest.java index 0f2daf00..777f0d4a 100644 --- a/engines/misc/src/test/java/org/alfresco/transform/misc/MiscTest.java +++ b/engines/misc/src/test/java/org/alfresco/transform/misc/MiscTest.java @@ -26,14 +26,11 @@ */ package org.alfresco.transform.misc; -import com.google.common.collect.ImmutableSet; import org.alfresco.transform.base.AbstractBaseTest; -import org.alfresco.transform.base.html.OptionLister; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.text.PDFTextStripper; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mock.web.MockMultipartFile; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; @@ -65,8 +62,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ public class MiscTest extends AbstractBaseTest { - @Autowired OptionLister optionLister; - protected final String sourceEncoding = "UTF-8"; protected final String targetEncoding = "UTF-8"; protected final String targetMimetype = MIMETYPE_TEXT_PLAIN; @@ -503,14 +498,4 @@ public class MiscTest extends AbstractBaseTest super.targetMimetype = this.targetMimetype; super.queueTransformRequestUsingDirectAccessUrlTest(); } - - @Test - public void optionListTest() - { - assertEquals(ImmutableSet.of( - "pageLimit", - "targetEncoding", - "extractMapping"), - optionLister.getOptionNames(controller.transformConfig(0).getBody().getTransformOptions())); - } } \ No newline at end of file diff --git a/engines/pdfrenderer/pom.xml b/engines/pdfrenderer/pom.xml index bd8eec87..d61ec292 100644 --- a/engines/pdfrenderer/pom.xml +++ b/engines/pdfrenderer/pom.xml @@ -7,8 +7,8 @@ org.alfresco alfresco-transform-core - 2.6.1-SNAPSHOT ../../pom.xml + 2.6.1-SNAPSHOT diff --git a/engines/pom.xml b/engines/pom.xml new file mode 100644 index 00000000..e69de29b diff --git a/engines/tika/pom.xml b/engines/tika/pom.xml index 934e733e..15fcd4b5 100644 --- a/engines/tika/pom.xml +++ b/engines/tika/pom.xml @@ -5,10 +5,10 @@ - Tika - alfresco-transform-core org.alfresco - 2.6.1-SNAPSHOT + alfresco-transform-core ../../pom.xml + 2.6.1-SNAPSHOT diff --git a/engines/tika/src/test/java/org/alfresco/transform/tika/TikaTest.java b/engines/tika/src/test/java/org/alfresco/transform/tika/TikaTest.java index 2456cdff..beee8321 100644 --- a/engines/tika/src/test/java/org/alfresco/transform/tika/TikaTest.java +++ b/engines/tika/src/test/java/org/alfresco/transform/tika/TikaTest.java @@ -119,7 +119,7 @@ public class TikaTest extends AbstractBaseTest "The quick brown fox jumps over the lazy dogs"; private static final String EXPECTED_CSV_CONTENT_CONTAINS = "\"The\",\"quick\",\"brown\",\"fox\""; - @Autowired OptionLister optionLister; + protected @Autowired OptionLister optionLister; @Mock private RuntimeExec.ExecutionResult mockExecutionResult; diff --git a/pom.xml b/pom.xml index 17bbe631..eb3fea45 100644 --- a/pom.xml +++ b/pom.xml @@ -3,8 +3,8 @@ 4.0.0 org.alfresco alfresco-transform-core - Alfresco Transform Core 2.6.1-SNAPSHOT + Alfresco Transform Core pom