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

    Licensed to jclouds, Inc. (jclouds) under one or more
    contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  jclouds licenses this file
    to you 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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jclouds</groupId>
        <artifactId>jclouds-project</artifactId>
        <version>1.2.2</version>
        <relativePath>../../project/pom.xml</relativePath>
    </parent>
    <groupId>org.jclouds.provider</groupId>
    <artifactId>aws-s3</artifactId>
    <name>jclouds Amazon Simple Storage Service (S3) provider</name>
    <description>Simple Storage Service (S3) implementation targeted to Amazon Web Services</description>
    <packaging>bundle</packaging>

    <properties>
        <test.initializer>org.jclouds.aws.s3.blobstore.integration.AWSS3TestInitializer</test.initializer>
        <test.aws-s3.endpoint>https://s3.amazonaws.com</test.aws-s3.endpoint>
        <test.aws-s3.apiversion>2006-03-01</test.aws-s3.apiversion>
        <test.aws-s3.identity>${test.aws.identity}</test.aws-s3.identity>
        <test.aws-s3.credential>${test.aws.credential}</test.aws-s3.credential>
        <test.blobstore.container-count>25</test.blobstore.container-count>
    </properties>

    <!-- temporary -->
    <repositories>
        <repository>
            <id>jboss-public-releases</id>
            <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>


    <dependencies>
        <dependency>
            <groupId>org.jclouds.api</groupId>
            <artifactId>s3</artifactId>
            <version>${project.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.jclouds.api</groupId>
            <artifactId>s3</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jclouds</groupId>
            <artifactId>jclouds-core</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jclouds</groupId>
            <artifactId>jclouds-blobstore</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jclouds.driver</groupId>
            <artifactId>jclouds-log4j</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jclouds.driver</groupId>
            <artifactId>jclouds-apachehc</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jclouds.driver</groupId>
            <artifactId>jclouds-enterprise</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>live</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>integration</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <systemProperties>
                                        <property>
                                            <name>test.aws-s3.endpoint</name>
                                            <value>${test.aws-s3.endpoint}</value>
                                        </property>
                                        <property>
                                            <name>test.aws-s3.apiversion</name>
                                            <value>${test.aws-s3.apiversion}</value>
                                        </property>
                                        <property>
                                            <name>test.aws-s3.identity</name>
                                            <value>${test.aws-s3.identity}</value>
                                        </property>
                                        <property>
                                            <name>test.aws-s3.credential</name>
                                            <value>${test.aws-s3.credential}</value>
                                        </property>
                                        <property>
                                            <name>test.initializer</name>
                                            <value>${test.initializer}</value>
                                        </property>
                                        <property>
                                            <name>jclouds.blobstore.httpstream.url</name>
                                            <value>${jclouds.blobstore.httpstream.url}</value>
                                        </property>
                                        <property>
                                            <name>jclouds.blobstore.httpstream.md5</name>
                                            <value>${jclouds.blobstore.httpstream.md5}</value>
                                        </property>
                                        <property>
                                            <name>test.blobstore.container-count</name>
                                            <value>${test.blobstore.container-count}</value>
                                        </property>
                                    </systemProperties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>    
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Export-Package>org.jclouds.aws.s3.*;version="${project.version}"</Export-Package>
                        <Import-Package>
                            org.jclouds.*;version="${project.version}",
                            org.jclouds.http.options;version="${project.version}",
                            *
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

