<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-core</artifactId>
    <version>12.1.0.alpha2</version>
  </parent>
  <artifactId>jetty-deploy</artifactId>
  <name>Core :: Deployers</name>
  <description>Jetty deployers</description>

  <properties>
    <bundle-symbolic-name>${project.groupId}.deploy</bundle-symbolic-name>
    <spotbugs.onlyAnalyze>org.eclipse.jetty.deploy.*</spotbugs.onlyAnalyze>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-jmx</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-slf4j-impl</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <!-- Using as ZIP to avoid having classes and dependencies live in test classloader -->
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-test-core-example-webapp</artifactId>
      <version>${project.version}</version>
      <classifier>core-webapp</classifier>
      <type>zip</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain</groupId>
      <artifactId>jetty-test-helper</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-core-webapps</id>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <includeClassifiers>core-webapp</includeClassifiers>
              <includeTypes>zip</includeTypes>
              <outputDirectory>${project.build.directory}/core-webapps/</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
              <stripClassifier>true</stripClassifier>
              <stripVersion>true</stripVersion>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <excludePackageNames>*.internal,*.internal.*</excludePackageNames>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>@{argLine} ${jetty.surefire.argLine}
            --add-modules org.eclipse.jetty.jmx
            --add-reads org.eclipse.jetty.deploy=org.eclipse.jetty.http
            --add-reads org.eclipse.jetty.deploy=org.eclipse.jetty.logging</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
