<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>
    <artifactId>alfresco-googledrive-share</artifactId>
    <version>4.1.0-A2</version>
    <packaging>amp</packaging>
    <name>Alfresco / Google Drive Share Module</name>

    <parent>
        <groupId>org.alfresco.integrations</groupId>
        <artifactId>alfresco-googledrive</artifactId>
        <version>4.1.0-A2</version>
    </parent>

    <properties>
        <image.name>alfresco/alfresco-share-gd</image.name>
        <image.tag>latest</image.tag>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>share</artifactId>
            <version>${dependency.share.version}</version>
            <classifier>classes</classifier>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.alfresco</groupId>
                    <artifactId>alfresco-web-framework-commons</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-reload4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.reload4j</groupId>
                    <artifactId>reload4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <groupId>org.alfresco.maven.plugin</groupId>
                <artifactId>alfresco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>yuicompressor-maven-plugin</artifactId>
                <version>1.5.1</version>
                <executions>
                    <execution>
                        <id>compressyui</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>compress</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <exclude>**/*.css</exclude>
                        <exclude>**/*.get.js</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>src/main/amp/config/alfresco/web-extension</directory>
                            <includes>
                                <include>**/custom-slingshot-googledocs-context.xml</include>
                            </includes>
                        </fileset>
						 <fileset>
                            <directory>src/main/amp/config/alfresco/web-extension/site-data/extensions</directory>
                            <includes>
                                <include>**/configurations.xml</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>include-documentLibraryConfig</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <copy file="src/main/documentLibrary-config/withManagerCancel/custom-slingshot-googledocs-context.xml" tofile="src/main/amp/config/alfresco/web-extension/custom-slingshot-googledocs-context.xml" />
								<copy file="src/main/documentLibrary-config/surfWebExtensions/configurations.xml" tofile="src/main/amp/config/alfresco/web-extension/site-data/extensions/configurations.xml" />
                            </target>

                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>io.fabric8</groupId>
                    <artifactId>docker-maven-plugin</artifactId>
                    <configuration>
                        <images>
                            <image>
                                <name>${image.name}:${image.tag}</name>
                                <build>
                                    <dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
                                    <assembly>
                                        <descriptor>target-assembly.xml</descriptor>
                                    </assembly>
                                    <buildOptions>
                                        <squash>true</squash>
                                    </buildOptions>
                                </build>
                            </image>
                        </images>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <!-- Builds local image for development & testing only.  -->
            <id>local</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>build-image</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>build</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
