<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF 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.apache.felix</groupId>
        <artifactId>felix-parent</artifactId>
        <version>2.1</version>
        <relativePath>../../pom/pom.xml</relativePath>
    </parent>

    <name>Apache Felix Http Parent POM</name>
    <groupId>org.apache.felix</groupId>
    <artifactId>org.apache.felix.http.parent</artifactId>
    <version>6-SNAPSHOT</version>
    <packaging>pom</packaging>

    <prerequisites>
        <maven>2.2.1</maven>
    </prerequisites>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    	<jetty.version>9.2.6.v20141205</jetty.version>
    	<cometd.version>2.8.0</cometd.version>
    	<http.service.version>1.2.1</http.service.version>
    	<servlet.version>3.1.0</servlet.version>
        <!--
            Java API and class file compliance. This property supports
            one of three values:
              - 6: Java 6 (default)
              - 7: Java 7 
            Using anything else causes the set-bundle-required-execution-environment
            to fail the build with an exception
        -->
        <http.java.version>6</http.java.version>
    </properties>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/http/parent</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/http/parent</developerConnection>
        <url>http://svn.apache.org/viewvc/felix/trunk/http/parent/</url>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>set-bundle-required-execution-environment</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>initialize</phase>
                        <configuration>
                            <exportAntProperties>true</exportAntProperties>
                            <target>
                                <script language="javascript"> <![CDATA[
                                    var System = java.lang.System;
                                    var bree = "J2SE-1.6";
                                    var httpJavaVersion = System.getProperty("http.java.version");
                                    if (!httpJavaVersion) {
                                        httpJavaVersion = project.getProperty("http.java.version");
                                    }
                                    if (httpJavaVersion == "7") {
                                        bree = "JavaSE-1.7";
	                                    System.out.println("Setting Bundle-RequiredExecutionEnvironment=" + bree + " from http.java.version=" + httpJavaVersion);
                                    } else if (httpJavaVersion != "6") {
                                        System.out.println("Unsupported http.java.version=" + httpJavaVersion + "; must be 6 or 7.");
                                        throw "http.java.version must be 6 or 7";
                                    }
                                    project.setProperty("http.bree", bree);
                                ]]></script>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
	                <source>1.${http.java.version}</source>
                    <target>1.${http.java.version}</target>
                    <compilerVersion>1.${http.java.version}</compilerVersion>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.5.3</version>
                    <executions>
                      <execution>
                        <id>bundle</id>
                        <phase>package</phase>
                        <goals>
                          <goal>bundle</goal>
                        </goals>
                      </execution>
                      <execution>
                        <id>baseline</id>
                        <goals>
                          <goal>baseline</goal>
                        </goals>
                      </execution>
                    </executions>
                    <configuration>
                        <instructions>
                            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                            <Bundle-Version>${project.version}</Bundle-Version>
                            <Bundle-RequiredExecutionEnvironment>${http.bree}</Bundle-RequiredExecutionEnvironment>
                        </instructions>                        
                    </configuration>
                 </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>biz.aQute</groupId>
            <artifactId>bndlib</artifactId>
            <version>1.50.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${servlet.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>4.2.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.compendium</artifactId>
                <version>4.2.0</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
