groupdocs-total/GroupDocs.Total-for-Java-Spring

View on GitHub
pom.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.groupdocs.ui</groupId>
    <artifactId>total-spring</artifactId>
    <version>0.4.75</version>
    <packaging>${packaging.type}</packaging>

    <name>GroupDocs.Total for Java Spring Sample</name>
    <url>http://groupdocs.com</url>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.RELEASE</version>
    </parent>

    <profiles>
        <!--mvn package -P jar-->
        <profile>
            <id>jar</id>
            <!--mvn package == mvn package -P jar-->
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <packaging.type>jar</packaging.type>
                <scope>compile</scope>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-shade-plugin</artifactId>
                        <version>2.4.3</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>shade</goal>
                                </goals>
                                <configuration>
                                    <transformers>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                            <resource>META-INF/spring.handlers</resource>
                                        </transformer>
                                        <transformer
                                                implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
                                            <resource>META-INF/spring.factories</resource>
                                        </transformer>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                            <resource>META-INF/spring.schemas</resource>
                                        </transformer>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                            <mainClass>com.groupdocs.ui.Application</mainClass>
                                        </transformer>
                                        <transformer
                                                implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                            <manifestEntries>
                                                <Specification-Title>GroupDocs.Total for Java Spring
                                                </Specification-Title>
                                                <Specification-Version>${project.version}</Specification-Version>
                                                <Specification-Vendor>GroupDocs</Specification-Vendor>
                                                <Implementation-Title>GroupDocs.Total for Java Spring
                                                </Implementation-Title>
                                                <Implementation-Version>${project.version}</Implementation-Version>
                                                <Implementation-Vendor>GroupDocs</Implementation-Vendor>
                                                <Extension-Name>com.sun.media.imageio</Extension-Name>
                                            </manifestEntries>
                                        </transformer>
                                    </transformers>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!--mvn package -P war-->
        <profile>
            <id>war</id>
            <properties>
                <packaging.type>war</packaging.type>
                <scope>provided</scope>
            </properties>
        </profile>
    </profiles>

    <properties>
        <start-class>com.groupdocs.ui.Application</start-class>
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>2.0.4.RELEASE</version>
            <!-- For using tomcat please remove this exclusion-->
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- For using tomcat please uncomment this tomcat dependency
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>2.0.4.RELEASE</version>
            <scope>${scope}</scope>
        </dependency>-->
        <!-- For using tomcat please comment or remove this jetty dependency -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>
            <version>2.0.4.RELEASE</version>
            <scope>${scope}</scope>
        </dependency>
        <!-- the end of jetty dependency -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>2.0.4.RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
            <version>2.0.4.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>com.groupdocs</groupId>
            <artifactId>groupdocs-annotation</artifactId>
            <version>19.7</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.groupdocs</groupId>
            <artifactId>groupdocs-viewer</artifactId>
            <version>21.2</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.groupdocs</groupId>
            <artifactId>groupdocs-conversion</artifactId>
            <version>19.4</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.groupdocs</groupId>
            <artifactId>groupdocs-comparison</artifactId>
            <version>21.6</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.groupdocs</groupId>
            <artifactId>groupdocs-signature</artifactId>
            <version>19.1</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.groupdocs</groupId>
            <artifactId>groupdocs-editor</artifactId>
            <version>20.11</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>11.0.2</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.10.7</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.6</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>GroupDocsJavaAPI</id>
            <name>GroupDocs Java API</name>
            <url>http://artifact.groupdocs.com/repo/</url>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <workingDirectory>client</workingDirectory>
                </configuration>
                <executions>
                    <execution>
                        <!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>v10.15.1</nodeVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm update</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>update</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install client</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>build client</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Example of usage tomcat7 plugin for deploying
             for deploying/undeploying use war profile '-P war',
             for example: 'mvn -P war tomcat7:deploy'-->

            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <url>http://localhost:8080/manager/text</url>
                    <server>TomcatServer</server>
                    <path>/app</path>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>