Fix build

This commit is contained in:
alandavis
2022-08-08 16:16:55 +01:00
parent 3e58acfdb9
commit f646ed86bd
13 changed files with 58 additions and 34 deletions

View File

@@ -5,10 +5,10 @@
<name>- All-In-One</name> <name>- All-In-One</name>
<parent> <parent>
<artifactId>alfresco-transform-core</artifactId>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<version>2.6.1-SNAPSHOT</version> <artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>

View File

@@ -6,13 +6,13 @@
* %% * %%
* This file is part of the Alfresco software. * This file is part of the Alfresco software.
* - * -
* If the software was purchased under a paid Alfresco license, the terms of * If the software was purchased under a paid Alfresco license", "the terms of
* the paid license agreement will prevail. Otherwise, the software is * the paid license agreement will prevail. Otherwise", "the software is
* provided under the following open source license terms: * provided under the following open source license terms:
* - * -
* Alfresco is free software: you can redistribute it and/or modify * 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 * 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. * (at your option) any later version.
* - * -
* Alfresco is distributed in the hope that it will be useful, * Alfresco is distributed in the hope that it will be useful,
@@ -21,16 +21,54 @@
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
* - * -
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * along with Alfresco. If not", "see <http://www.gnu.org/licenses/>.
* #L% * #L%
*/ */
package org.alfresco.transform.aio; package org.alfresco.transform.aio;
import com.google.common.collect.ImmutableSet;
import org.alfresco.transform.tika.TikaTest; 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. * Test Tika functionality in All-In-One.
*/ */
public class AIOTikaTest extends TikaTest 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()));
}
} }

View File

@@ -7,6 +7,7 @@
<parent> <parent>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId> <artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version> <version>2.6.1-SNAPSHOT</version>
</parent> </parent>

View File

@@ -5,10 +5,10 @@
<name>- Example</name> <name>- Example</name>
<parent> <parent>
<artifactId>alfresco-transform-core</artifactId>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<version>2.6.1-SNAPSHOT</version> <artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>

View File

@@ -5,10 +5,10 @@
<name>- ImageMagick</name> <name>- ImageMagick</name>
<parent> <parent>
<artifactId>alfresco-transform-core</artifactId>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<version>2.6.1-SNAPSHOT</version> <artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>

View File

@@ -5,10 +5,10 @@
<name>- LibreOffice</name> <name>- LibreOffice</name>
<parent> <parent>
<artifactId>alfresco-transform-core</artifactId>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<version>2.6.1-SNAPSHOT</version> <artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>

View File

@@ -5,10 +5,10 @@
<name>- Misc</name> <name>- Misc</name>
<parent> <parent>
<artifactId>alfresco-transform-core</artifactId>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<version>2.6.1-SNAPSHOT</version> <artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>

View File

@@ -26,14 +26,11 @@
*/ */
package org.alfresco.transform.misc; package org.alfresco.transform.misc;
import com.google.common.collect.ImmutableSet;
import org.alfresco.transform.base.AbstractBaseTest; import org.alfresco.transform.base.AbstractBaseTest;
import org.alfresco.transform.base.html.OptionLister;
import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper; import org.apache.pdfbox.text.PDFTextStripper;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; 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 public class MiscTest extends AbstractBaseTest
{ {
@Autowired OptionLister optionLister;
protected final String sourceEncoding = "UTF-8"; protected final String sourceEncoding = "UTF-8";
protected final String targetEncoding = "UTF-8"; protected final String targetEncoding = "UTF-8";
protected final String targetMimetype = MIMETYPE_TEXT_PLAIN; protected final String targetMimetype = MIMETYPE_TEXT_PLAIN;
@@ -503,14 +498,4 @@ public class MiscTest extends AbstractBaseTest
super.targetMimetype = this.targetMimetype; super.targetMimetype = this.targetMimetype;
super.queueTransformRequestUsingDirectAccessUrlTest(); super.queueTransformRequestUsingDirectAccessUrlTest();
} }
@Test
public void optionListTest()
{
assertEquals(ImmutableSet.of(
"pageLimit",
"targetEncoding",
"extractMapping"),
optionLister.getOptionNames(controller.transformConfig(0).getBody().getTransformOptions()));
}
} }

View File

@@ -7,8 +7,8 @@
<parent> <parent>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId> <artifactId>alfresco-transform-core</artifactId>
<version>2.6.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>

0
engines/pom.xml Normal file
View File

View File

@@ -5,10 +5,10 @@
<name>- Tika</name> <name>- Tika</name>
<parent> <parent>
<artifactId>alfresco-transform-core</artifactId>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<version>2.6.1-SNAPSHOT</version> <artifactId>alfresco-transform-core</artifactId>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
<version>2.6.1-SNAPSHOT</version>
</parent> </parent>
<properties> <properties>

View File

@@ -119,7 +119,7 @@ public class TikaTest extends AbstractBaseTest
"The quick brown fox jumps over the lazy dogs"; "The quick brown fox jumps over the lazy dogs";
private static final String EXPECTED_CSV_CONTENT_CONTAINS = "\"The\",\"quick\",\"brown\",\"fox\""; private static final String EXPECTED_CSV_CONTENT_CONTAINS = "\"The\",\"quick\",\"brown\",\"fox\"";
@Autowired OptionLister optionLister; protected @Autowired OptionLister optionLister;
@Mock @Mock
private RuntimeExec.ExecutionResult mockExecutionResult; private RuntimeExec.ExecutionResult mockExecutionResult;

View File

@@ -3,8 +3,8 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<artifactId>alfresco-transform-core</artifactId> <artifactId>alfresco-transform-core</artifactId>
<name>Alfresco Transform Core</name>
<version>2.6.1-SNAPSHOT</version> <version>2.6.1-SNAPSHOT</version>
<name>Alfresco Transform Core</name>
<packaging>pom</packaging> <packaging>pom</packaging>
<parent> <parent>