<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.mule.modules</groupId>
  <artifactId>mule-module-zuora</artifactId>
  <version>1.1.3-SNPASHOT</version>
  <packaging>mule-module</packaging>
  <name>Mule Zuora Cloud Connector</name>

  <properties>
    <mule.version>3.1.0</mule.version>
    <mule.devkit.version>3.0-SNAPSHOT</mule.devkit.version>
    <junit.version>4.8.2</junit.version>
    <mockito.version>1.8.2</mockito.version>
    <cxf.version>2.3.0</cxf.version>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.mule.tools.devkit</groupId>
          <artifactId>mule-devkit-maven-plugin</artifactId>
          <version>${mule.devkit.version}</version>
          <extensions>true</extensions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>cxf-codegen-plugin</artifactId>
        <groupId>org.apache.cxf</groupId>
        <version>${cxf.version}</version>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
             <extension>true</extension>
              <wsdlOptions>
                <wsdlOption>
                  <wsdl>${basedir}/src/main/resources/zuora-29.modified.wsdl</wsdl>
                  
                    <bindingFiles>
                        <bindingFile>${basedir}/src/main/resources/bindings.xml</bindingFile>
                    </bindingFiles>
                  <autoNameResolution>true</autoNameResolution>
                </wsdlOption>
              </wsdlOptions>
            </configuration>
            <goals>
              <goal>wsdl2java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <compilerArgument>-proc:none</compilerArgument>
              <source>1.6</source>
              <target>1.6</target>
            </configuration>
          </execution>
          <execution>
            <id>default-testCompile</id>
            <configuration>
              <compilerArgument>-proc:none</compilerArgument>
              <source>1.6</source>
              <target>1.6</target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.mule.tools.devkit</groupId>
        <artifactId>mule-devkit-maven-plugin</artifactId>
        <version>${mule.devkit.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.8</version>
    <executions>
      <execution>
        <id>attach-javadocs</id>
        <goals>
          <goal>jar</goal>
        </goals>
      </execution>
    </executions>
    <configuration>
      <docletArtifact>
        <groupId>org.mule.tools.devkit</groupId>
        <artifactId>mule-devkit-doclet</artifactId>
        <version>${mule.devkit.version}</version>
      </docletArtifact>
      <doclet>org.mule.devkit.doclet.Doclava</doclet>
      <bootclasspath>${sun.boot.class.path}</bootclasspath>
      <additionalparam>
        -quiet
        -federate JDK
        http://download.oracle.com/javase/6/docs/api/index.html?
        -federationxml JDK
        http://doclava.googlecode.com/svn/static/api/openjdk-6.xml
        -hdf project.name "${project.name}"
        -d
        ${project.build.directory}/apidocs
                    </additionalparam>
      <useStandardDocletOptions>false</useStandardDocletOptions>
      <additionalJOption>-J-Xmx1024m</additionalJOption>
    </configuration>
  </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <pushChanges>false</pushChanges>
        </configuration>
        <version>2.1</version>
      </plugin>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.8.0</version>
        <configuration>
          <header>LICENSE_HEADER.txt</header>
          <excludes>
            <exclude>target/**</exclude>
            <exclude>src/main/java/com/sforce/**</exclude>
            <exclude>.gitignore</exclude>
            <exclude>**/*.txt</exclude>
            <exclude>**/*.ftl</exclude>
            <exclude>**/build-number.txt</exclude> <!-- bamboo -->
          </excludes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <filtering>true</filtering>
        <directory>src/test/resources</directory>
      </resource>
    </resources>
  </build>

  <dependencies>
    <!-- CXF -->
    <dependency>
      <groupId>org.mule.modules</groupId>
      <artifactId>mule-module-cxf</artifactId>
      <version>${mule.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-databinding-jaxb</artifactId>
      <version>${cxf.version}</version>
      <scope>provided</scope>
      <exclusions>
        <!-- We use javax.activation -->
        <exclusion>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-activation_1.1_spec</artifactId>
        </exclusion>
        <!-- We use javax.mail -->
        <exclusion>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-javamail_1.4_spec</artifactId>
        </exclusion>
        <!-- We use stax-api -->
        <exclusion>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-stax-api_1.0_spec</artifactId>
        </exclusion>
        <!-- We use javax.xml.ws:jaxws-api -->
        <exclusion>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-jaxws_2.1_spec</artifactId>
        </exclusion>
        <!-- We use slf4j -->
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mule.tests</groupId>
      <artifactId>mule-tests-functional</artifactId>
      <version>${mule.version}</version>
      <scope>test</scope>
    </dependency>

    <!--  Mule & Devkit -->
    <dependency>
      <groupId>org.mule.modules</groupId>
      <artifactId>mule-module-spring-config</artifactId>
      <version>${mule.version}</version>
    </dependency>
    <dependency>
      <groupId>org.mule.tools.devkit</groupId>
      <artifactId>mule-devkit-annotations</artifactId>
      <version>${mule.devkit.version}</version>
    </dependency>

    <!-- documentation -->
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>muleforge-releases</id>
      <name>MuleForge Releases Repository</name>
      <url>http://repository.mulesoft.org/releases/</url>
      <layout>default</layout>
    </repository>
    <repository>
      <id>muleforge-snapshots</id>
      <name>MuleForge Snapshots Repository</name>
      <url>http://repository.mulesoft.org/snapshots/</url>
      <layout>default</layout>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>muleforge-plugin-releases</id>
      <name>Muleforge Release Repository</name>
      <url>http://repository.mulesoft.org/releases/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>muleforge-plugin-snapshots</id>
      <name>Muleforge Snapshot Repository</name>
      <url>http://repository.mulesoft.org/snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>


  <scm>
    <connection>scm:git:git://github.com:mulesoft/zuora-connector.git</connection>
    <developerConnection>scm:git:git@github.com:mulesoft/zuora-connector.git</developerConnection>
    <url>http://github.com/mulesoft/zuora-connector</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>mulesoft-releases</id>
      <name>MuleSoft Snapshot Repository</name>
      <url>http://repository.mulesoft.org/releases/</url>
    </repository>
    <snapshotRepository>
      <id>mulesoft-snapshots</id>
      <name>MuleSoft Repository</name>
      <url>http://repository.mulesoft.org/snapshots/</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>

</project>
