<!--
  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>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-api</artifactId>
    <packaging>jar</packaging>
    <name>Apache CXF API</name>
    <version>2.1.3</version>
    <url>http://cxf.apache.org</url>

    <parent>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-parent</artifactId>
        <version>2.1.3</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-activation_1.1_spec</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-common-utilities</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.ws.commons.schema</groupId>
            <artifactId>XmlSchema</artifactId>
        </dependency>

        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-annotation_1.0_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>wstx-asl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.neethi</groupId>
            <artifactId>neethi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-common-schemas</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-xjc-dv</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-schemas</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/schemas</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.cxf</groupId>
                                    <artifactId>cxf-common-schemas</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-common-xsd</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <xsdOptions>
                                <xsdOption>
                                    <xsd>${basedir}/target/schemas/schemas/wsdl/http.xsd</xsd>
                                    <bindingFile>${basedir}/target/schemas/schemas/wsdl/http.xjb</bindingFile>
                                    <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
                                    <dependencies>
                                        <dependency>${basedir}/target/schemas/schemas/wsdl/wsdl.xsd</dependency>
                                    </dependencies>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/target/schemas/schemas/wsdl/ws-addr.xsd</xsd>
                                    <packagename>org.apache.cxf.ws.addressing</packagename>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/target/schemas/schemas/wsdl/addressing.xsd</xsd>
                                    <bindingFile>${basedir}/target/schemas/schemas/wsdl/addressing.xjb</bindingFile>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/target/schemas/schemas/configuration/security.xsd</xsd>
                                    <bindingFile>${basedir}/target/schemas/schemas/configuration/security.xjb</bindingFile>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/target/schemas/schemas/wsdl/ws-addr-wsdl.xsd</xsd>
                                    <bindingFile>${basedir}/target/schemas/schemas/wsdl/ws-addr-wsdl.xjb</bindingFile>
                                    <extension>true</extension>
                                </xsdOption>
                                   <xsdOption>
                                    <xsd>${basedir}/target/schemas/schemas/wsdl/addressing200403.xsd</xsd>
                                    <bindingFile>${basedir}/target/schemas/schemas/wsdl/addressing200403.xjb</bindingFile>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>generate-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <configuration>
                            <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
                            <xsdOptions>
                                <xsdOption>
                                    <xsd>${basedir}/src/test/resources/schemas/wsdl/test-conf.xsd</xsd>
                                    <bindingFile>${basedir}/src/test/resources/schemas/wsdl/test-conf.xjb</bindingFile>
                                    <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
                                    <deleteDirs>
                                        <deleteDir>${basedir}/target/generated/src/test/java/org/apache/cxf/wsdl</deleteDir>
                                    </deleteDirs>
                                </xsdOption>
                                <xsdOption>
                                    <xsd>${basedir}/src/test/resources/schemas/foo.xsd</xsd>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                    </execution>

                </executions>

                <dependencies>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-xjc-dv</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-common-utilities</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>

        <pluginManagement>
             <plugins>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
                     <executions>
                         <execution>
                             <id>package</id>
                             <phase>package</phase>
                             <goals>
                                 <goal>jar</goal>
                             </goals>
                         </execution>
                     </executions>
                     <configuration>
                         <header>Apache CXF API</header>
                         <footer>Apache CXF API</footer>
                     </configuration>
                 </plugin>
             </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>fastinstall</id>
        </profile>
        <profile>
            <!-- default profile enables javadoc stuff -->
            <id>everything</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/cxf/tags/cxf-2.1.3/api</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/cxf/tags/cxf-2.1.3/api</developerConnection>
    </scm>

</project>
