<?xml version="1.0" encoding="UTF-8"?>
<!--
 * 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>
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.tuscany</groupId>
        <artifactId>parent</artifactId>
        <version>0.1-integration-incubating-SNAPSHOT</version>
    </parent>
    <groupId>org.apache.tuscany.sca</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <name>Apache Tuscany SCA Implementation Project</name>
    <version>0.1-integration-incubating-SNAPSHOT</version>
    <properties>
        <sca.version>0.1-integration-incubating-SNAPSHOT</sca.version>
        <scaKernelVersion>0.1-integration-incubating-SNAPSHOT</scaKernelVersion>
        <axis2Version>1.1.1</axis2Version>
    </properties>

    <!-- definition of repositories where the parent pom can be found -->
    <repositories>
        <repository>
            <id>apache.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>apache.incubator</id>
            <name>Apache Incubator Repository</name>
            <url>http://people.apache.org/repo/m2-incubating-repository/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <!-- Tuscany Kernel Modules -->
            <dependency>
                <groupId>org.apache.tuscany.sca.kernel</groupId>
                <artifactId>tuscany-core</artifactId>
                <version>${scaKernelVersion}</version>
                <scope>compile</scope>
            </dependency>

            <!-- org.osoa.sca API -->
            <dependency>
                <groupId>org.osoa</groupId>
                <artifactId>sca-api-r0.95</artifactId>
                <version>0.1-integration-incubating-SNAPSHOT</version>
                <scope>compile</scope>
            </dependency>
            <!-- javax.servlet API -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.5</version>
                <scope>provided</scope>
            </dependency>
            <!-- javax.resource API -->
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>
            <!-- commonj.work and commonj.timer APIs -->
            <dependency>
                <groupId>org.apache.tuscany</groupId>
                <artifactId>commonj-api_r1.1</artifactId>
                <version>0.1-integration-incubating-SNAPSHOT</version>
                <scope>compile</scope>
            </dependency>
            <!-- java.xml.stream API -->
            <dependency>
                <groupId>stax</groupId>
                <artifactId>stax-api</artifactId>
                <version>1.0.1</version>
                <scope>compile</scope>
            </dependency>

            <!-- StAX implementation -->
            <dependency>
                <groupId>org.codehaus.woodstox</groupId>
                <artifactId>wstx-asl</artifactId>
                <version>3.2.0</version>
                <scope>runtime</scope>
            </dependency>

            <!-- Axis2 Implementation -->
            <dependency>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2-kernel</artifactId>
                <version>${axis2Version}</version>
                <scope>compile</scope>
            </dependency>

<!--
            <dependency>
                <groupId>org.apache.axis2</groupId>
                <artifactId>addressing</artifactId>
                <version>${axis2Version}</version>
                <package>mar</package>
                <scope>compile</scope>
            </dependency>
            -->

            <!-- AXIOM Implementation -->
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-api</artifactId>
                <version>1.2.2</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-impl</artifactId>
                <version>1.2.2</version>
                <scope>compile</scope>
            </dependency>

            <!-- Woden implementation -->
            <dependency>
                <groupId>incubator-woden</groupId>
                <artifactId>woden</artifactId>
                <version>1.0.0M6</version>
                <scope>compile</scope>
            </dependency>

            <!-- wsdl4j implementation -->
            <dependency>
                <groupId>wsdl4j</groupId>
                <artifactId>wsdl4j</artifactId>
                <version>1.6.2</version>
            </dependency>

            <!-- XmlSchema implementation -->
            <dependency>
                <groupId>org.apache.ws.commons.schema</groupId>
                <artifactId>XmlSchema</artifactId>
                <version>1.2</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>2.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymockclassextension</artifactId>
                <version>2.2</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <defaultGoal>install</defaultGoal>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.1</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.tuscany</groupId>
                            <artifactId>buildtools</artifactId>
                            <version>${pom.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>process-sources</id>
                            <phase>process-sources</phase>
                            <configuration>
                                <configLocation>tuscany-checkstyle.xml</configLocation>
                                <suppressionsLocation>tuscany-suppressions.xml</suppressionsLocation>
                                <consoleOutput>true</consoleOutput>
                                <failsOnError>true</failsOnError>
                                <linkXRef>false</linkXRef>
                                <sourceDirectory>${basedir}/src</sourceDirectory>
                                <propertyExpansion>${checkstyle.properties}</propertyExpansion>
                            </configuration>
                            <goals>
                                <goal>checkstyle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <rulesets>
                            <ruleset>${basedir}/.ruleset</ruleset>
                        </rulesets>
                        <linkXRef>false</linkXRef>
                        <targetJdk>1.5</targetJdk>
                    </configuration>
                    <executions>
                        <execution>
                            <id>process-sources</id>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.3</version>
                    <configuration>
                        <includes>
                            <include>**/*TestCase.java</include>
                        </includes>
                        <reportFormat>brief</reportFormat>
                        <useFile>false</useFile>
                        <forkMode>once</forkMode>
                        <argLine>-ea -Xmx128m</argLine>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix.plugins</groupId>
                    <artifactId>maven-osgi-plugin</artifactId>
                    <version>0.8.0-SNAPSHOT</version>
                    <extensions>true</extensions>
                    <configuration>
                        <osgiManifest>
                            <bundleName>${pom.name}</bundleName>
                            <bundleDescription>${pom.description}</bundleDescription>
                            <bundleVendor>${pom.organization.name}</bundleVendor>
                            <bundleLocalization>plugin</bundleLocalization>
                        </osgiManifest>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clover-plugin</artifactId>
                    <configuration>
                        <jdk>1.5</jdk>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>stable</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>kernel</module>
                <module>services</module>
                <module>extensions</module>
            </modules>
        </profile>

        <profile>
            <id>integration</id>
            <modules>
                <module>kernel</module>
                <module>services</module>
                <module>extensions</module>
            </modules>
        </profile>

        <profile>
            <id>unstable</id>
            <modules>
                <module>kernel</module>
                <module>services</module>
                <module>extensions</module>
            </modules>
        </profile>

    </profiles>

</project>
