<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 - JAX-WS Tools Maven Plugin</name>
  <groupId>org.jboss.ws.plugins</groupId>
  <artifactId>maven-jaxws-tools-plugin</artifactId>
  <packaging>maven-plugin</packaging>

  <version>1.0.0.GA</version>

  <!-- Parent -->
  <parent>
    <groupId>org.jboss.ws</groupId>
    <artifactId>jbossws-parent</artifactId>
    <version>1.0.4.GA</version>
  </parent>

  <!-- Source Control Management -->
  <scm>
    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/projects/plugins/maven/jaxws-tools/tags/jaxws-tools-1.0.0.GA</connection>
    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/projects/plugins/maven/jaxws-tools/tags/jaxws-tools-1.0.0.GA</developerConnection>
    <url>http://fisheye.jboss.com/viewrep/JBossWS/projects/plugins/maven/jaxws-tools/tags/jaxws-tools-1.0.0.GA</url>
  </scm>

  <!-- Properties -->
  <properties>
    <jbossws.spi.version>1.3.0.Beta3</jbossws.spi.version>
    <maven.project.version>2.0.4</maven.project.version>
    <maven.plugin.api.version>2.0.4</maven.plugin.api.version>
    <maven.invoker.plugin.version>1.5</maven.invoker.plugin.version>
    <!-- For test -->
    <junit.version>4.7</junit.version>
    <maven.plugin.testing.harness.version>1.1</maven.plugin.testing.harness.version>
    <jbossws.cxf.client.version>3.3.0.Beta1</jbossws.cxf.client.version>
    <jbossws.metro.client.version>3.3.0.Beta1</jbossws.metro.client.version>
    <jbossws.native.client.version>3.3.0.Beta4</jbossws.native.client.version>
    <jbossxb.version>2.0.1.GA</jbossxb.version>
  </properties>
  
  <!-- Dependencies -->
  <dependencies>
    <dependency>
      <groupId>org.jboss.ws</groupId>
      <artifactId>jbossws-spi</artifactId>
      <version>${jbossws.spi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${maven.project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.plugin.api.version}</version>
    </dependency>

    <!-- Non transient test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <type>jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>${maven.plugin.testing.harness.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- The following are declared here just to prepare the local maven repo and use that in the embedded tests, making them faster and with simpler pom.xml files -->   
    <dependency>
	  <groupId>org.jboss.ws.native</groupId>
	  <artifactId>jbossws-native-client</artifactId>
	  <version>${jbossws.native.client.version}</version>
	  <scope>test</scope>
	</dependency>
	<dependency>
	  <groupId>org.jboss.ws.cxf</groupId>
      <artifactId>jbossws-cxf-client</artifactId>
      <version>${jbossws.cxf.client.version}</version>
	  <scope>test</scope>
    </dependency>
    <dependency>
	  <groupId>org.jboss.ws.metro</groupId>
	  <artifactId>jbossws-metro-client</artifactId>
	  <version>${jbossws.metro.client.version}</version>
	  <scope>test</scope>
	</dependency>
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jbossxb</artifactId>
      <version>${jbossxb.version}</version>
      <optional>true</optional>
	  <!-- <scope>test</scope> --> <!-- TODO Move this to test scope instead of making it optional; currently messes up classloader in wsprovide test with Native stack -->
    </dependency>
     <dependency>
      <groupId>com.sun</groupId>
      <artifactId>tools</artifactId>
      <version>1.5.0</version>
      <scope>system</scope>
      <systemPath>${java.home}/../lib/tools.jar</systemPath> <!-- Required by wsprovide with Metro stack (because of APT) -->
    </dependency>
    
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
  
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>${maven.invoker.plugin.version}</version>
        <configuration>
          <projectsDirectory>src/test/resources/test-embedded</projectsDirectory>
          <settingsFile>src/test/resources/test-embedded/settings.xml</settingsFile>
          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
          <preBuildHookScript>setup.bsh</preBuildHookScript>
          <postBuildHookScript>verify.bsh</postBuildHookScript>
          <addTestClassPath>true</addTestClassPath>
        </configuration>
        <executions>
          <execution>
            <id>integration-test-native</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/test-embedded-native</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
            </configuration>
          </execution>
          <execution>
            <id>integration-test-cxf</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/test-embedded-cxf</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom-cxf.xml</pomInclude>
              </pomIncludes>
            </configuration>
          </execution>
          <execution>
            <id>integration-test-metro</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/test-embedded-metro</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom-metro.xml</pomInclude>
              </pomIncludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*TestCase.java</include>
            <include>**/*Test.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
