mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
ATS-706: Transform AIO - fix license log messages to be consistent on startup (#219)
- see also ATS-711
This commit is contained in:
parent
8acff769b3
commit
7952c40ee5
@ -30,6 +30,11 @@ import static org.alfresco.transformer.logging.StandardMessages.LICENCE;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.alfresco.transformer.executors.ImageMagickCommandExecutor;
|
||||||
|
import org.alfresco.transformer.executors.LibreOfficeJavaExecutor;
|
||||||
|
import org.alfresco.transformer.executors.PdfRendererCommandExecutor;
|
||||||
|
import org.alfresco.transformer.executors.TikaJavaExecutor;
|
||||||
|
import org.alfresco.transformer.transformers.SelectingTransformer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -69,9 +74,11 @@ public class Application
|
|||||||
{
|
{
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
||||||
logger.info("The transformers in this project use libraries from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0. or in /Apache\\\\ 2.0.txt");
|
logger.info(ImageMagickCommandExecutor.LICENCE);
|
||||||
logger.info("Additional libraries used:");
|
logger.info(LibreOfficeJavaExecutor.LICENCE);
|
||||||
logger.info("* htmlparser http://htmlparser.sourceforge.net/license.html");
|
logger.info(TikaJavaExecutor.LICENCE);
|
||||||
|
logger.info(PdfRendererCommandExecutor.LICENCE);
|
||||||
|
Arrays.stream(SelectingTransformer.LICENCE.split("\\n")).forEach(logger::info);
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
logger.info("Starting application components... Done");
|
logger.info("Starting application components... Done");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -30,6 +30,7 @@ import static org.alfresco.transformer.logging.StandardMessages.LICENCE;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.alfresco.transformer.executors.ImageMagickCommandExecutor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -69,7 +70,7 @@ public class Application
|
|||||||
{
|
{
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
||||||
logger.info("This transformer uses ImageMagick from ImageMagick Studio LLC. See the license at http://www.imagemagick.org/script/license.php or in /ImageMagick-license.txt");
|
logger.info(ImageMagickCommandExecutor.LICENCE);
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
logger.info("Starting application components... Done");
|
logger.info("Starting application components... Done");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -39,6 +39,8 @@ public class ImageMagickCommandExecutor extends AbstractCommandExecutor
|
|||||||
private static final String DYN = ROOT + "/lib";
|
private static final String DYN = ROOT + "/lib";
|
||||||
private static final String EXE = "/usr/bin/convert";
|
private static final String EXE = "/usr/bin/convert";
|
||||||
|
|
||||||
|
public static final String LICENCE = "This transformer uses ImageMagick from ImageMagick Studio LLC. See the license at http://www.imagemagick.org/script/license.php or in /ImageMagick-license.txt";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected RuntimeExec createTransformCommand()
|
protected RuntimeExec createTransformCommand()
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -30,6 +30,7 @@ import static org.alfresco.transformer.logging.StandardMessages.LICENCE;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.alfresco.transformer.executors.LibreOfficeJavaExecutor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -69,7 +70,7 @@ public class Application
|
|||||||
{
|
{
|
||||||
logger.info("-------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("-------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
||||||
logger.info("This transformer uses LibreOffice from The Document Foundation. See the license at https://www.libreoffice.org/download/license/ or in /libreoffice.txt");
|
logger.info(LibreOfficeJavaExecutor.LICENCE);
|
||||||
logger.info("-------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("-------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
logger.info("Starting application components... Done");
|
logger.info("Starting application components... Done");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -55,6 +55,8 @@ public class LibreOfficeJavaExecutor implements JavaExecutor
|
|||||||
private static final int JODCONVERTER_TRANSFORMATION_ERROR_CODE = 3088;
|
private static final int JODCONVERTER_TRANSFORMATION_ERROR_CODE = 3088;
|
||||||
private static final String OFFICE_HOME = "/opt/libreoffice6.3";
|
private static final String OFFICE_HOME = "/opt/libreoffice6.3";
|
||||||
|
|
||||||
|
public static final String LICENCE = "This transformer uses LibreOffice from The Document Foundation. See the license at https://www.libreoffice.org/download/license/ or in /libreoffice.txt";
|
||||||
|
|
||||||
private JodConverter jodconverter;
|
private JodConverter jodconverter;
|
||||||
|
|
||||||
public LibreOfficeJavaExecutor()
|
public LibreOfficeJavaExecutor()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.transformer;
|
package org.alfresco.transformer;
|
||||||
|
|
||||||
|
import org.alfresco.transformer.transformers.SelectingTransformer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -40,6 +41,10 @@ import org.springframework.context.event.EventListener;
|
|||||||
|
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
import io.micrometer.core.instrument.MeterRegistry;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import static org.alfresco.transformer.logging.StandardMessages.LICENCE;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
|
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
|
||||||
public class Application
|
public class Application
|
||||||
@ -64,9 +69,7 @@ public class Application
|
|||||||
public void startup()
|
public void startup()
|
||||||
{
|
{
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
logger.info("The transformers in this project use libraries from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0. or in /Apache\\\\ 2.0.txt");
|
Arrays.stream(SelectingTransformer.LICENCE.split("\\n")).forEach(logger::info);
|
||||||
logger.info("Additional libraries used:");
|
|
||||||
logger.info("* htmlparser http://htmlparser.sourceforge.net/license.html");
|
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
logger.info("Starting application components... Done");
|
logger.info("Starting application components... Done");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -50,6 +50,11 @@ public class SelectingTransformer
|
|||||||
{
|
{
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SelectingTransformer.class);
|
private static final Logger logger = LoggerFactory.getLogger(SelectingTransformer.class);
|
||||||
|
|
||||||
|
public static final String LICENCE =
|
||||||
|
"This transformer uses libraries from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0. or in /Apache\\\\ 2.0.txt\\n" +
|
||||||
|
"Additional libraries used:\n" +
|
||||||
|
"* htmlparser http://htmlparser.sourceforge.net/license.html";
|
||||||
|
|
||||||
private final Map<String, SelectableTransformer> transformers = ImmutableMap
|
private final Map<String, SelectableTransformer> transformers = ImmutableMap
|
||||||
.<String, SelectableTransformer>builder()
|
.<String, SelectableTransformer>builder()
|
||||||
.put("appleIWorks", new AppleIWorksContentTransformer())
|
.put("appleIWorks", new AppleIWorksContentTransformer())
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -30,6 +30,7 @@ import static org.alfresco.transformer.logging.StandardMessages.LICENCE;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.alfresco.transformer.executors.PdfRendererCommandExecutor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -69,7 +70,7 @@ public class Application
|
|||||||
{
|
{
|
||||||
logger.info("-----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("-----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
||||||
logger.info("alfresco-pdf-renderer uses the PDFium library from Google Inc. See the license at https://pdfium.googlesource.com/pdfium/+/master/LICENSE or in /pdfium.txt");
|
logger.info(PdfRendererCommandExecutor.LICENCE);
|
||||||
logger.info("-----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("-----------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
logger.info("Starting application components... Done");
|
logger.info("Starting application components... Done");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -35,6 +35,8 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public class PdfRendererCommandExecutor extends AbstractCommandExecutor
|
public class PdfRendererCommandExecutor extends AbstractCommandExecutor
|
||||||
{
|
{
|
||||||
|
public static final String LICENCE = "This transformer uses alfresco-pdf-renderer which uses the PDFium library from Google Inc. See the license at https://pdfium.googlesource.com/pdfium/+/master/LICENSE or in /pdfium.txt";
|
||||||
|
|
||||||
private static final String EXE = "/usr/bin/alfresco-pdf-renderer";
|
private static final String EXE = "/usr/bin/alfresco-pdf-renderer";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -30,6 +30,7 @@ import static org.alfresco.transformer.logging.StandardMessages.LICENCE;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import org.alfresco.transformer.executors.TikaJavaExecutor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -69,7 +70,7 @@ public class Application
|
|||||||
{
|
{
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
Arrays.stream(LICENCE.split("\\n")).forEach(logger::info);
|
||||||
logger.info("Tika is from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0. or in /Apache\\ 2.0.txt");
|
logger.info(TikaJavaExecutor.LICENCE);
|
||||||
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
logger.info("--------------------------------------------------------------------------------------------------------------------------------------------------------------");
|
||||||
|
|
||||||
logger.info("Starting application components... Done");
|
logger.info("Starting application components... Done");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Transform Core
|
* Alfresco Transform Core
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* -
|
* -
|
||||||
@ -45,6 +45,8 @@ import org.xml.sax.SAXException;
|
|||||||
*/
|
*/
|
||||||
public class TikaJavaExecutor implements JavaExecutor
|
public class TikaJavaExecutor implements JavaExecutor
|
||||||
{
|
{
|
||||||
|
public static final String LICENCE = "This transformer uses Tika from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0. or in /Apache\\ 2.0.txt";
|
||||||
|
|
||||||
private final Tika tika;
|
private final Tika tika;
|
||||||
|
|
||||||
public TikaJavaExecutor()
|
public TikaJavaExecutor()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user