<?xml version="1.0" encoding="UTF-8"?>
<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">

    <!--

        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.
    -->

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.servicemix</groupId>
        <artifactId>servicemix-pom</artifactId>
        <relativePath>../servicemix-pom/pom.xml</relativePath>
        <version>5</version>
    </parent>

    <groupId>org.apache.servicemix.specs</groupId>
    <artifactId>specs</artifactId>
    <packaging>pom</packaging>
    <version>2.2.0</version>
    <name>Apache ServiceMix :: Specs</name>
    <inceptionYear>2007</inceptionYear>

    <modules>
        <module>locator</module>
        <module>activator</module>
        <module>saaj-api-1.3</module>
        <module>stax-api-1.0</module>
        <module>stax-api-1.2</module>
        <module>jain-sip-api-1.2</module>
        <module>jaxb-api-2.0</module>
        <module>jaxb-api-2.1</module>
        <module>jaxb-api-2.2</module>
        <module>jaxp-api-1.3</module>
        <module>jaxp-api-1.4</module>
        <module>jaxws-api-2.0</module>
        <module>jaxws-api-2.1</module>
        <module>jaxws-api-2.2</module>
        <module>jbi-api-1.0</module>
        <module>scripting-api-1.0</module>
        <module>jsr250-1.0</module>
        <module>jsr311-api-0.8</module>
        <module>jsr311-api-1.0</module>
        <module>jsr311-api-1.1</module>
        <module>jsr311-api-1.1.1</module>
        <module>jsr339-api-m10</module>
        <module>jsr339-api-m13</module>
        <module>javamail-api-1.4</module>
        <module>activation-api-1.1</module>
        <module>java-persistence-api-1.1.1</module>
        <module>java-persistence-api-2.0</module>
        <module>jsr303-api-1.0.0</module>
        <module>jcr-api-2.0</module>
        <module>assembly</module>
    </modules>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/servicemix/smx4/specs/tags/specs-2.2.0</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/servicemix/smx4/specs/tags/specs-2.2.0</developerConnection>
        <url>http://svn.apache.org/viewvc/servicemix/smx4/specs/tags/specs-2.2.0</url>
    </scm>

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

    <prerequisites>
        <maven>2.0.7</maven>
    </prerequisites>

    <properties>
        <osgi.version>4.2.0</osgi.version>
    </properties>

    <repositories>
        <!-- Default repository -->
        <repository>
            <id>central</id>
            <name>Default maven repo</name>
            <url>http://repo1.maven.org/maven2</url>
        </repository>
        <!-- ServiceMix repo -->
        <repository>
            <id>servicemix</id>
            <name>Apache ServiceMix Repository</name>
            <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <!-- ServiceMix repo -->
        <pluginRepository>
            <id>servicemix</id>
            <name>Apache ServiceMix Repository</name>
            <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
        </pluginRepository>
        <!-- JApiDiff-->
        <pluginRepository>
            <id>japidiff</id>
            <name>JApiDiff Repository</name>
            <url>http://japidiff.googlecode.com/svn/m2-repo</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <!-- adding the OSGi JAR everywhere to ensure javadoc can get built -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>${osgi.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.servicemix.legal</groupId>
                <artifactId>legal</artifactId>
                <version>1.0</version>
                <type>xml</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <defaultGoal>install</defaultGoal>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.1</version>
                </plugin>
                <!--
                   Adding some extra config to what has already been defined in org.apache:apache-7:pom
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <preparationGoals>clean install</preparationGoals>
                        <arguments>-Prelease,deploy</arguments>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.1.0</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.0.2</version>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                        <maxmem>256M</maxmem>
                        <fork>${compiler.fork}</fork>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-idea-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <downloadSources>true</downloadSources>
                        <downloadJavadocs>true</downloadJavadocs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>1.1</version>
                </plugin>
                <plugin>
                    <groupId>com.google.code.japidiff</groupId>
                    <artifactId>maven-japidiff-plugin</artifactId>
                    <version>1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.5.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.0</version>
                <executions>
                    <execution>
                        <id>copy-legal</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.servicemix.legal</groupId>
                                    <artifactId>legal</artifactId>
                                    <version>1.0</version>
                                    <type>xml</type>
                                    <outputDirectory>target/legal/</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <resourceBundles>
                                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                            </resourceBundles>
                            <supplementalModels>
                                <supplementalModel>target/legal/legal.xml</supplementalModel>
                            </supplementalModels>
                            <properties>
                                <addLicense>true</addLicense>
                                <addArtifact>true</addArtifact>
                                <projectName>Apache ServiceMix</projectName>
                            </properties>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <minmemory>128m</minmemory>
                    <maxmemory>512m</maxmemory>
                    <breakiterator>true</breakiterator>
                    <quiet>true</quiet>
                    <verbose>false</verbose>
                    <source>1.5</source>
                    <linksource>true</linksource>
                    <links>
                        <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
                        <link>http://download.oracle.com/javaee/5/api/</link>
                        <link>http://www.osgi.org/javadoc/r4/</link>
                    </links>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.0</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>fastinstall</id>
            <properties>
                <maven.test.skip>true</maven.test.skip>
            </properties>
        </profile>
        <profile>
            <id>rat</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>rat-maven-plugin</artifactId>
                        <version>1.0-alpha-3</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <reportFile>${project.build.directory}/${project.build.finalName}.rat</reportFile>
                            <excludes>
                                <exclude>**/target/**/*</exclude>
                                <!-- IDEA files -->
                                <exclude>**/*.iml</exclude>
                                <exclude>**/*.ipr</exclude>
                                <exclude>**/*.iws</exclude>
                                <!-- Eclipse files -->
                                <exclude>**/.*</exclude>
                                <exclude>**/eclipse-classes/**/*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- We want to deploy the artifact to a staging location for perusal -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.3</version>
                        <inherited>true</inherited>
                        <configuration>
                            <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
                            <updateReleaseInfo>true</updateReleaseInfo>
                        </configuration>
                    </plugin>
                    <!-- We want to sign the artifact, the POM, and all attached artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.0-alpha-4</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deploy</id>
            <build>
                <defaultGoal>deploy</defaultGoal>
            </build>
        </profile>
    </profiles>

</project>
