<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>
  
  <name>JBoss Web Services - Stack CXF Server</name>
  <artifactId>jbossws-cxf-server</artifactId>
  <packaging>jar</packaging>
  
  <!-- Parent -->
  <parent>
    <groupId>org.jboss.ws.cxf</groupId>
    <artifactId>jbossws-cxf</artifactId>
    <version>5.4.2.Final</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  
  <!-- Dependencies -->
  <dependencies>
  
    <dependency> <!-- Always make sure jbossws-cxf-factories dependency is explicitly declared before anything transitively pulling CXF -->
      <groupId>org.jboss.ws.cxf</groupId>
      <artifactId>jbossws-cxf-factories</artifactId>
      <version>${project.version}</version>
    </dependency>
    
    <dependency>
      <groupId>org.jboss.ws.cxf</groupId>
      <artifactId>jbossws-cxf-client</artifactId>
      <version>${project.version}</version>
    </dependency>
    
    <dependency>
      <groupId>org.jboss.spec.javax.ejb</groupId>
      <artifactId>jboss-ejb-api_3.2_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.servlet</groupId>
      <artifactId>jboss-servlet-api_4.0_spec</artifactId>
    </dependency>
    <!-- jbossws dependencies -->
    <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-spi</artifactId>
    </dependency>
    <!-- CXF dependencies -->
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-features-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-bindings-soap</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-bindings-coloc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-features-clustering</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-management</artifactId>
    </dependency>  
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-jms</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-local</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-mex</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-rm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-policy</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-tools-java2ws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-tools-wsdlto-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.services.sts</groupId>
      <artifactId>cxf-services-sts-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.services.ws-discovery</groupId>
      <artifactId>cxf-services-ws-discovery-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.xjcplugins</groupId>
      <artifactId>cxf-xjc-boolean</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.xjcplugins</groupId>
      <artifactId>cxf-xjc-bug986</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.xjcplugins</groupId>
      <artifactId>cxf-xjc-dv</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.xjcplugins</groupId>
      <artifactId>cxf-xjc-ts</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.xjc-utils</groupId>
      <artifactId>cxf-xjc-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity-engine-core</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.xml.stream</groupId>
      <artifactId>stax-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.santuario</groupId>
      <artifactId>xmlsec</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.woodstox</groupId>
      <artifactId>woodstox-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.jws</groupId>
      <artifactId>jsr181-api</artifactId>
    </dependency>
    
    <!-- jboss provided -->
    <dependency>
      <groupId>org.picketbox</groupId>
      <artifactId>picketbox</artifactId>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
    </dependency>
    
    <!-- transitive dependencies -->
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-xjc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>codemodel</artifactId>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind.external</groupId>
      <artifactId>rngom</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.xml.bind</groupId>
      <artifactId>jboss-jaxb-api_2.3_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.xml.soap</groupId>
      <artifactId>jboss-saaj-api_1.4_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.jms</groupId>
      <artifactId>jboss-jms-api_2.0_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.security.jacc</groupId>
      <artifactId>jboss-jacc-api_1.5_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging-processor</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  
  <!-- Plugins -->
  <build>
    <resources>
      <resource>
        <targetPath>.</targetPath>
        <directory>src/main/resources/jbossws-cxf-server.jar</directory>
      </resource>
      <resource>
        <directory>src/main/java</directory>
         <includes>
          <include>**/*.properties</include>
         </includes>
      </resource>
    </resources>
    <plugins>
      <!-- http://jira.codehaus.org/browse/MANTRUN-89 -->
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <ant antfile="src/main/scripts/antrun-beans-config.xml" />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!--
    Name:  enforce
    Descr: Enforce artifact dependencies
    -->
    <profile>
      <id>enforce</id>
      <activation>
        <property>
          <name>!skip-enforce</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>ban-bad-dependencies</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <bannedDependencies>
                      <searchTransitive>true</searchTransitive>
                      <excludes>
                        <exclude>org.apache.cxf:cxf-rt-bindings-corba</exclude>
                        <exclude>org.apache.cxf:cxf-rt-javascript</exclude>
                        <exclude>org.apache.geronimo.specs:*:*:*:compile</exclude>
                        <exclude>org.codehaus.jra:jra</exclude>
                        <exclude>asm:asm</exclude> <!-- We want newer version -->
                        <exclude>org.slf4j:slf4j-jdk14</exclude>
                        <exclude>org.springframework:*</exclude>
                        <exclude>com.sun.xml.bind:*</exclude>
                        <exclude>org.jboss.spec.javax.servlet:jboss-servlet-api_3.1_spec</exclude><!-- We want 4.0 API -->

                        <!-- We want to use JBoss versions of these APIs -->
                        <exclude>javax.annotation:javax.annotation-api:*:*:compile</exclude>
                        <exclude>javax.ejb:ejb-api</exclude>
                        <exclude>javax.jms:javax.jms-api</exclude>
                        <exclude>javax.security.auth.message:javax.security.auth.message-api</exclude>
                        <exclude>javax.security.jacc:javax.security.jacc-api</exclude>
                        <exclude>javax.servlet:servlet-api</exclude>
                        <exclude>javax.xml.bind:jaxb-api:*:*:compile</exclude>
                        <exclude>javax.xml.soap:saaj-api</exclude>
                        <exclude>javax.xml.ws:jaxws-api:*:*:compile</exclude>
                      </excludes>
                    </bannedDependencies>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
</project>
