<?xml version="1.0" encoding="utf-8"?>
<!-- # Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
	# # Licensed under the Apache License, Version 2.0 (the "License"); # you
	may not use this file except in compliance with the License. # You may obtain
	a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #
	# Unless required by applicable law or agreed to in writing, software # distributed
	under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES
	OR CONDITIONS OF ANY KIND, either express or implied. # See the License for
	the specific language governing permissions and # limitations under the License. -->
<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">

    <parent>
        <groupId>org.wso2.carbon.appmgt</groupId>
        <artifactId>carbon-appmgt</artifactId>
        <version>1.2.21</version>
	<relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.appmgt.impl</artifactId>
    <version>1.2.21</version>
    <packaging>bundle</packaging>
    <name>WSO2 Carbon - APP Management Implementation </name>
    <repositories>
        <repository>
            <id>wso2-nexus</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
            </releases>
        </repository>
    </repositories>
  <dependencies>
      <dependency>
        <groupId>org.apache.ws.commons.axiom.wso2</groupId>
        <artifactId>axiom</artifactId>
      </dependency>
    	<dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.user.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.governance</groupId>
            <artifactId>org.wso2.carbon.governance.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.registry</groupId>
            <artifactId>org.wso2.carbon.registry.ws.client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.appmgt</groupId>
            <artifactId>org.wso2.carbon.appmgt.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.identity.framework</groupId>
            <artifactId>org.wso2.carbon.identity.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.identity.inbound.auth.oauth2</groupId>
            <artifactId>org.wso2.carbon.identity.oauth</artifactId>
        </dependency>
      <dependency>
          <groupId>org.wso2.carbon</groupId>
          <artifactId>org.wso2.carbon.webapp.mgt.stub</artifactId>
      </dependency>
        <dependency>
            <groupId>com.h2database.wso2</groupId>
            <artifactId>h2-database-engine</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.osgi</groupId>
                    <artifactId>org.eclipse.osgi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.identity.framework</groupId>
             <artifactId>org.wso2.carbon.user.mgt.stub</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.identity.user.ws</groupId>
            <artifactId>org.wso2.carbon.um.ws.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.utils</artifactId>
        </dependency>
	<dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.commons</groupId>
            <artifactId>org.wso2.carbon.event.core</artifactId>
        </dependency>
        <dependency>
           <groupId>org.wso2.carbon.identity.framework</groupId>
           <artifactId>org.wso2.carbon.idp.mgt.stub</artifactId>
        </dependency>
        <dependency>
          <groupId>org.wso2.carbon.registry</groupId>
          <artifactId>org.wso2.carbon.registry.indexing</artifactId>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple.wso2</groupId>
            <artifactId>json-simple</artifactId>
        </dependency>
        <dependency>
          <groupId>org.wso2.carbon.governance</groupId>
          <artifactId>org.wso2.carbon.governance.registry.extensions</artifactId>
        </dependency>
        <dependency>
          <groupId>org.wso2.carbon.store</groupId>
          <artifactId>jaggery-scxml-executors</artifactId>
        </dependency>
        <dependency>
          <groupId>org.wso2.carbon.identity.inbound.auth.saml2</groupId>
          <artifactId>org.wso2.carbon.identity.sso.saml.stub</artifactId>
        </dependency>
        <dependency>
          <groupId>org.wso2.carbon.identity.framework</groupId>
          <artifactId>org.wso2.carbon.identity.application.mgt.stub</artifactId>
        </dependency>
        <dependency>
          <groupId>org.wso2.carbon.identity.framework</groupId>
          <artifactId>org.wso2.carbon.identity.entitlement.stub</artifactId>
        </dependency>
        <dependency>
          <groupId>org.wso2.carbon.identity.agent.entitlement.mediator</groupId>
          <artifactId>org.wso2.carbon.identity.entitlement.proxy</artifactId>
        </dependency>
      <dependency>
          <groupId>org.wso2.carbon.appmgt</groupId>
          <artifactId>org.wso2.carbon.appmgt.gateway.stub</artifactId>
      </dependency>
      <dependency>
          <groupId>org.wso2.carbon.store</groupId>
          <artifactId>org.wso2.carbon.social.core</artifactId>
      </dependency>
      <dependency>
          <groupId>org.wso2.carbon.identity.framework</groupId>
          <artifactId>org.wso2.carbon.identity.base</artifactId>
      </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>

                    <execution>
                        <id>create-test-database</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <path id="h2.classpath">
                                    <path refid="maven.compile.classpath" />
                                </path>
                                <echo message="########### Create Test Database ##############" />
                                <sql driver="org.h2.Driver" url="jdbc:h2:${basedir}/target/repository/database/WSO2AM_DB" userid="wso2carbon" password="wso2carbon" autocommit="true" onerror="continue">
                                    <classpath>
                                        <path refid="h2.classpath" />
                                    </classpath>
                                    <fileset file="${basedir}/src/test/resources/dbscripts/h2.sql" />
                                    <fileset file="${basedir}/src/test/resources/dbscripts/h2-sample-data.sql" />

                                </sql>
                                <echo message="##################### END ########################" />
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
                <configuration>
                   <skipTests>true</skipTests>
                    <systemProperties>
                        <property>
                            <name>APIManagerDBConfigurationPath</name>
                            <value>${basedir}/src/test/resources/amConfig.xml</value>
                        </property>
                        <property>
                            <name>IdentityConfigurationPath</name>
                            <value>${basedir}/src/test/resources/identity.xml</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Private-Package>
                            org.wso2.carbon.appmgt.impl.internal
                        </Private-Package>
                        <Export-Package>
                            !org.wso2.carbon.appmgt.impl.internal.*,
                            org.wso2.carbon.appmgt.impl.*
                        </Export-Package>
                        <Import-Package>
                            org.wso2.carbon.utils,
                            org.wso2.carbon.governance.api.*,
                            org.wso2.carbon.registry.ws.client.*,
                            org.wso2.carbon.appmgt.api.model.*,
                            org.wso2.carbon.appmgt.api.*,
                            org.wso2.carbon.user.mgt.stub.*;version="${carbon.user.mgt.pkg.version}",
                            org.wso2.carbon.governance.registry.extensions.aspects.*;version="${governance.registry.extensions.imp.pkg.version}",
                            javax.servlet;version="${javax.servlet.imp.pkg.version}",
                            javax.servlet.http;version="${javax.servlet.imp.pkg.version}",
                            javax.servlet.resources;version="${javax.servlet.imp.pkg.version}",
                            org.eclipse.equinox.http.helper,
                            org.wso2.carbon.identity.*;version="${carbon.identity.pkg.version}",
                            org.wso2.carbon.um.ws.api.stub.*;version="${carbon.identity.pkg.version}",
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <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>
        </plugins>
    </build>
</project>

