<?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>1-incubator</version>
    </parent>
    <groupId>org.apache.tuscany.sca</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <name>Tuscany SCA Implementation Project</name>
    <version>1.0-incubator-M2-SNAPSHOT</version>
    <properties>
        <sca.version>1.0-incubator-M2-SNAPSHOT</sca.version>
        <scaKernelVersion>1.0-incubator-M2-SNAPSHOT</scaKernelVersion>
        <axis2Version>1.1</axis2Version>
    </properties>

    <!-- definition of repositories where the parent pom can be found -->
    <repositories>
        <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>
        <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>
    </repositories>

    <pluginRepositories>
        <!-- needed for SDO plugin -->
        <pluginRepository>
            <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>
        </pluginRepository>
    </pluginRepositories>

    <modules>
        <module>kernel</module>
        <module>test</module>
        <module>services</module>
        <module>runtime</module>
        <module>commands</module>
        <module>tools</module>
        <module>plugins</module>
        <module>distribution</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <!-- Tuscany Kernel Modules -->
            <dependency>
                <groupId>org.apache.tuscany.sca.kernel</groupId>
                <artifactId>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>1.0-incubator-M2</version>
                <scope>compile</scope>
            </dependency>
            <!-- javax.servlet API -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.4</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>
            <!-- javax.transaction API -->
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jta_1.0.1B_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>1.0-incubator-M2</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>woodstox</groupId>
                <artifactId>wstx-asl</artifactId>
                <version>3.0.1</version>
                <scope>runtime</scope>
            </dependency>

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

            <!-- AXIOM Implementation -->
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-api</artifactId>
                <version>1.2</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.ws.commons.axiom</groupId>
                <artifactId>axiom-impl</artifactId>
                <version>1.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.1</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>3.8.1</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>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.tuscany</groupId>
                            <artifactId>buildtools</artifactId>
                            <version>1.0-incubator-M2</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>
                    <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.2</version>
                    <configuration>
                        <includes>
                            <include>**/*TestCase.java</include>
                        </includes>
                        <reportFormat>brief</reportFormat>
                        <useFile>false</useFile>
                        <forkMode>once</forkMode>
                        <argLine>-ea</argLine>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix.plugins</groupId>
                    <artifactId>maven-osgi-plugin</artifactId>
                    <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>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.1</version>
                    <executions>
                        <execution>
                            <id>package</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <aggregate>false</aggregate>
                        <links>
                            <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
                        </links>
                        <offlineLinks>
                            <offlineLink>
                                <url>../api</url>
                                <location>../api/target/apidocs</location>
                            </offlineLink>
                            <offlineLink>
                                <url>../host-api</url>
                                <location>../host-api/target/apidocs</location>
                            </offlineLink>
                            <offlineLink>
                                <url>../spi</url>
                                <location>../spi/target/apidocs</location>
                            </offlineLink>
                        </offlineLinks>
                        <!--
                            <outputDirectory>${tuscany.home}/distribution/build/javadoc/${project.artifactId}</outputDirectory>
                        -->
                        <quiet>true</quiet>
                        <bottom>-</bottom>
                        <header>${project.name}</header>
                        <footer>${project.name}</footer>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>
</project>
