<!-- 
 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</groupId>
        <artifactId>apache</artifactId>
        <version>21</version>
        <relativePath />
    </parent>

    <groupId>org.apache.felix</groupId>
    <artifactId>felix-parent</artifactId>
    <packaging>pom</packaging>

    <name>Apache Felix</name>
    <version>6</version>
    <url>http://felix.apache.org/</url>
    <inceptionYear>2006</inceptionYear>
    <description>Apache Felix is a community effort to implement the OSGi Framework and Service platform and other interesting OSGi-related technologies.</description>

    <prerequisites>
        <maven>3.5.0</maven>
    </prerequisites>

    <properties>
        <sourceReleaseAssemblyDescriptor>source-release-zip-tar</sourceReleaseAssemblyDescriptor>

        <!-- Default Java VM and API compatibility -->
        <felix.java.version>7</felix.java.version>
        
        <!-- Default settings for the site plugins -->
        <site.javadoc.exclude>*.impl:*.internal:</site.javadoc.exclude>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <issueManagement>
        <system>Jira</system>
        <url>http://issues.apache.org/jira/browse/FELIX</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>Felix Dev</name>
            <subscribe>dev-subscribe@felix.apache.org</subscribe>
            <unsubscribe>dev-unsubscribe@felix.apache.org</unsubscribe>
            <post>-</post>
            <archive>http://www.mail-archive.com/dev%40felix.apache.org/</archive>
        </mailingList>
        <mailingList>
            <name>Felix Commits</name>
            <subscribe>commits-subscribe@felix.apache.org</subscribe>
            <unsubscribe>commits-unsubscribe@felix.apache.org</unsubscribe>
            <post>-</post>
            <archive>http://www.mail-archive.com/commits%40felix.apache.org/</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/felix/releases/felix-parent-6</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/releases/felix-parent-6</developerConnection>
        <url>http://svn.apache.org/viewvc/felix/releases/?root=Apache-SVN/felix-parent-6</url>
    </scm>

    <distributionManagement>
        <site>
            <id>felix website</id>
            <url>file:///${user.dir}/target/site-deployed/</url>
        </site>
    </distributionManagement>

    <pluginRepositories>
        <pluginRepository>
            <id>apache.snapshots</id>
            <name>snapshot plugins</name>
            <url>http://repository.apache.org/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>ianal-maven-plugin</artifactId>
                    <version>1.0-alpha-1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.12</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-maven-plugin</artifactId>
                    <version>1.15</version>
                    <configuration>
                        <signature>
                            <groupId>org.codehaus.mojo.signature</groupId>
                            <artifactId>java1${felix.java.version}</artifactId>
                            <version>1.0</version>
                        </signature>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>2.19.1</version>
               </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                     <execution>
                        <id>enforce-property-values</id>
                        <goals>
                          <goal>enforce</goal>
                        </goals>
                        <configuration>
                          <rules>
                            <requireProperty>
                              <property>felix.java.version</property>
                              <regex>[6-9]</regex>
                              <regexMessage>The property "felix.java.version" may only have one of the following values: 6, 7, 8 or 9.</regexMessage>
                            </requireProperty>
                          </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <!-- Require Java 7 or higher for building (as bnd since version 3.0 is built with Java 7) -->
                                <requireJavaVersion>
                                    <message>
                                        Apache Felix must be compiled with Java 7 or higher
                                    </message>
                                    <version>1.7.0</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>3.5.0</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <excludePackageNames>${site.javadoc.exclude}</excludePackageNames>
                </configuration>
            </plugin>
           <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- check src only (except remote resources additions) -->
                    <includes>
                        <include>src/**</include>
                    </includes>
                    <excludes combine.children="append">
                        <!--  Used by maven-remote-resources-plugin -->
                        <exclude>src/main/appended-resources/**</exclude>
                        <!-- Exclude all JSON files -->
                        <exclude>**/*.json</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagBase>https://svn.apache.org/repos/asf/felix/releases</tagBase>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>ianal-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>verify-legal-files</goal>
                        </goals>
                        <configuration>
                            <strict>true</strict>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>.</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>changelog.txt</include>
                </includes>
            </resource>
        </resources>
        <extensions>
		   <extension>
		     <groupId>org.apache.maven.wagon</groupId>
		     <artifactId>wagon-ssh</artifactId>
		     <version>2.9</version>
		   </extension>
        </extensions>
    </build>

    <profiles>
        <profile>
            <id>jdk8-or-lower</id>
            <activation>
                <!-- syntax according to http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html -->
                <jdk>(,9)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <source>1.${felix.java.version}</source>
                            <target>1.${felix.java.version}</target>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>animal-sniffer-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                     </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jdk9-or-higher</id>
            <activation>
                <!-- syntax according to http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html -->
                <jdk>[9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <!-- 
                            release sets API classpath, source and target, see 
                            https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471 
                            and http://openjdk.java.net/jeps/247 -->
                            <release>${felix.java.version}</release>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
        <profile>
            <id>only-eclipse</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-antrun-plugin</artifactId>
                                                <versionRange>[1.3,)</versionRange>
                                                <goals>
                                                    <goal>run</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                 <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-dependency-plugin</artifactId>
                                                <versionRange>[2.2,)</versionRange>
                                                <goals>
                                                    <goal>copy-dependencies</goal>
                                                    <goal>unpack</goal>
                                                    <goal>unpack-dependencies</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                 <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.codehaus.mojo</groupId>
                                                <artifactId>build-helper-maven-plugin</artifactId>
                                                <versionRange>[1.5,)</versionRange>
                                                <goals>
                                                    <goal>reserve-network-port</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins
                                                </groupId>
                                                <artifactId>maven-enforcer-plugin</artifactId>
                                                <versionRange>[1.3.1,)</versionRange>
                                                <goals>
                                                    <goal>enforce</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-remote-resources-plugin</artifactId>
                                                <versionRange>[1.5,)</versionRange>
                                                <goals>
                                                    <goal>process</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.codehaus.mojo</groupId>
                                                <artifactId>native2ascii-maven-plugin</artifactId>
                                                <versionRange>[1.0-beta-1,)</versionRange>
                                                <goals>
                                                    <goal>native2ascii</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <templateDirectory>${user.dir}/src/site/</templateDirectory>
                    <template>maven-site.vm</template>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>dependencies</report>
                            <report>project-team</report>
                            <report>mailing-list</report>
                            <report>issue-tracking</report>
                            <report>license</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
