<?xml version="1.0" encoding="UTF-8"?>
<!--

 ADOBE CONFIDENTIAL
 __________________

  Copyright 2012 Adobe Systems Incorporated
  All Rights Reserved.

 NOTICE:  All information contained herein is, and remains
 the property of Adobe Systems Incorporated and its suppliers,
 if any.  The intellectual and technical concepts contained
 herein are proprietary to Adobe Systems Incorporated and its
 suppliers and are protected by trade secret or copyright law.
 Dissemination of this information or reproduction of this material
 is strictly forbidden unless prior written permission is obtained
 from Adobe Systems Incorporated.

-->
<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <!-- ====================================================================== -->
    <!-- P A R E N T  P R O J E C T  D E S C R I P T I O N                      -->
    <!-- ====================================================================== -->
    <parent>
        <groupId>com.adobe.cq.social</groupId>
        <artifactId>socialcommunities-parent</artifactId>
        <version>1.4.3</version>
        <relativePath />
    </parent>

    <!-- ====================================================================== -->
    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
    <!-- ====================================================================== -->
    <groupId>com.adobe.cq.social</groupId>
    <artifactId>cq-social-ugc-search-collections</artifactId>
    <version>2.2.22</version>
    <packaging>bundle</packaging>

    <name>AEM Communities UGC SearchCollections - Bundle</name>

    <properties>
        <lucene.version>3.6.1</lucene.version>
    </properties>

    <scm>
        <connection>scm:git:git@git.corp.adobe.com:CQ/social-ugc.git</connection>
        <developerConnection>scm:git:git@git.corp.adobe.com:CQ/social-ugc.git</developerConnection>
        <url>https://git.corp.adobe.com/CQ/social-ugc/tree/master/bundles/cq-social-ugc-search-collections</url>
        <tag>cq-social-ugc-search-collections-2.2.22</tag>
    </scm>

    <dependencies>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>

        <!--  SEARCH COLLECTIONS -->
        <!-- *************************************************************** -->
        <!-- Social  -->
        <!-- *************************************************************** -->

        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>${lucene.version}</version>
            <scope>compile</scope>
        </dependency>

        <!-- *************************************************************** -->
        <!-- COMMUNITIES -->
        <!-- *************************************************************** -->
        <dependency>
            <groupId>com.adobe.cq.social</groupId>
            <artifactId>cq-social-ugcbase-api</artifactId>
            <version>2.2.12</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.adobe.cq.social</groupId>
            <artifactId>cq-social-srp-api</artifactId>
            <version>1.2.5</version>
            <scope>provided</scope>
        </dependency>

        <!-- JCR -->

        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-core</artifactId>
            <version>2.8.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- SLING -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.api</artifactId>
            <version>2.7.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.jcr.api</artifactId>
            <version>2.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>biz.aQute</groupId>
            <artifactId>bndlib</artifactId>
            <version>1.50.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- FELIX -->

        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.annotations</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
           <groupId>org.apache.sling</groupId>
           <artifactId>org.apache.sling.commons.osgi</artifactId>
           <version>2.2.0</version>
        </dependency>

        <!--  XSS Protection -->

        <dependency>
            <groupId>com.day.cq</groupId>
            <artifactId>cq-xssprotection</artifactId>
            <version>5.4.0</version>
            <scope>provided</scope>
        </dependency>

        <!--  Service Users -->

        <dependency>
            <groupId>com.adobe.cq.social</groupId>
            <artifactId>cq-social-serviceusers-api</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- TESTING -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <type>jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-api</artifactId>
            <version>5.4.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.day.cq</groupId>
            <artifactId>cq-commons</artifactId>
            <version>5.5.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.adobe.granite</groupId>
            <artifactId>com.adobe.granite.security.user</artifactId>
            <version>0.1.44</version>
            <scope>test</scope>
        </dependency>

        <!--  Need to lookup cloud service configs (in tests)-->
        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-webservice-support</artifactId>
            <version>5.6.4</version>
            <scope>test</scope>
        </dependency>

       <!-- - -->

        <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
             <version>3.3.2</version>
             <scope>test</scope>
        </dependency>

        <!-- SEARCH COLLECTIONS DEPENDENCIES -->

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.annotation</artifactId>
            <version>6.0.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.1</version>
        </dependency>

        <!-- J2EE -->

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>
    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-scr-scrdescriptor</id>
                        <goals>
                            <goal>scr</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Category>social</Bundle-Category>
                        <Embed-Dependency>lucene-core;scope=compile,lucene-queries;scope=compile,jakarta-regexp;scope=compile,lucene-facet;scope=compile</Embed-Dependency>
                        <Export-Package>
                            com.adobe.cq.social.ugc.api
                        </Export-Package>
                    </instructions>
                    <comparisonVersion>1.3.62</comparisonVersion>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Xmx256m</argLine>
                    <systemProperties>
                        <property>
                            <name>java.awt.headless</name>
                            <value>true</value>
                        </property>
                        <property>
                            <name>derby.system.durability</name>
                            <value>test</value>
                        </property>
                        <property>
                            <name>derby.storage.fileSyncTransactionLog</name>
                            <value>true</value>
                        </property>
                        <property>
                            <name>derby.stream.error.file</name>
                            <value>target/derby.log</value>
                        </property>
                        <property>
                            <name>org.apache.jackrabbit.repository.home</name>
                            <value>target/repository-test</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>install-bundle</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>maven-sling-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-bundle</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                                <configuration>
                                    <slingUrl>http://localhost:4502/system/console</slingUrl>

                                    <user>admin</user>
                                    <password>admin</password>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- The release profile builds a source jar containing only the public classes, for javadocs -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <forceCreation>true</forceCreation>
                                    <includes>
                                        <include>com/adobe/cq/social/ugc/api/*</include>
                                    </includes>
                                    <excludes>
                                        <exclude>**/impl/**</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- The release profile builds a jar containing only the public classes, for the api jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>api-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>public-api</classifier>
                                    <includes>
                                        <include>com/adobe/cq/social/ugc/api/*</include>
                                    </includes>
                                    <excludes>
                                        <exclude>**/impl/**</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>static-analysis</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>codecoverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>-Xmx256m ${argLine}</argLine>
                            <systemProperties>
                                <property>
                                    <name>java.awt.headless</name>
                                    <value>true</value>
                                </property>
                                <property>
                                    <name>derby.system.durability</name>
                                    <value>test</value>
                                </property>
                                <property>
                                    <name>derby.storage.fileSyncTransactionLog</name>
                                    <value>true</value>
                                </property>
                                <property>
                                    <name>derby.stream.error.file</name>
                                    <value>target/derby.log</value>
                                </property>
                                <property>
                                    <name>org.apache.jackrabbit.repository.home</name>
                                    <value>target/repository-test</value>
                                </property>
                            </systemProperties>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
