<?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">
    <parent>
        <artifactId>server-libs</artifactId>
        <groupId>org.aperteworkflow</groupId>
        <version>3.2-RC1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>liferay-commons</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>model</artifactId>
            <version>3.2-RC1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.aperteworkflow</groupId>
            <artifactId>integration-interface</artifactId>
            <version>3.2-RC1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.liferay.portal</groupId>
            <artifactId>portal-service</artifactId>
            <version>${liferay.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.web</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-servlet-api</artifactId>
            <version>${tomcat.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.portlet</groupId>
            <artifactId>portlet-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <!-- Integration for Liferay is external jar, which should be copied to server shared libs -->
    <profiles>

        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>${maven.dependency.version}</version>
                        <executions>
                            <execution>
                               <id>copy-installed</id>
								<phase>install</phase>
								<goals>
								  <goal>copy</goal>
								</goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>${project.groupId}</groupId>
                                            <artifactId>${project.artifactId}</artifactId>
                                            <type>jar</type>
                                            <version>${project.version}</version>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>${lib.ext.dir}</outputDirectory>
                                            <destFileName>${project.artifactId}.jar</destFileName>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>