<?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.0.18</version>
  </parent>
  <artifactId>jetty-start</artifactId>
  <name>Core :: Start</name>
  <description>The start utility</description>
  <properties>
    <bundle-symbolic-name>${project.groupId}.start</bundle-symbolic-name>
    <junit.jupiter.execution.parallel.enabled>false</junit.jupiter.execution.parallel.enabled>
    <spotbugs.onlyAnalyze>org.eclipse.jetty.start.*</spotbugs.onlyAnalyze>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-util</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain</groupId>
      <artifactId>jetty-test-helper</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>build.properties</id>
            <goals>
              <goal>unpack</goal>
            </goals>
            <phase>process-resources</phase>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.eclipse.jetty</groupId>
                  <artifactId>jetty-util</artifactId>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                  <includes>**/build.properties</includes>
                  <fileMappers>
                    <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FlattenFileMapper"></fileMapper>
                  </fileMappers>
                  <outputDirectory>${project.build.outputDirectory}/org/eclipse/jetty/start/</outputDirectory>
                </artifactItem>
              </artifactItems>
              <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
          </execution>
          <execution>
            <id>unpack</id>
            <goals>
              <goal>unpack</goal>
            </goals>
            <phase>process-test-resources</phase>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.eclipse.jetty</groupId>
                  <artifactId>jetty-util</artifactId>
                  <type>jar</type>
                  <overWrite>false</overWrite>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.directory}/jetty-util</outputDirectory>
              <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.eclipse.jetty.start.Main</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>shade</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <createSourcesJar>true</createSourcesJar>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>shaded</shadedClassifierName>
              <filters>
                <filter>
                  <artifact>org.eclipse.jetty:jetty-util</artifact>
                  <includes>
                    <include>org/eclipse/jetty/util/JavaVersion*</include>
                    <include>org/eclipse/jetty/util/ManifestUtils*</include>
                    <include>org/eclipse/jetty/util/TopologicalSort*</include>
                    <include>org/eclipse/jetty/util/FileID*</include>
                  </includes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>org.eclipse.jetty.util</pattern>
                  <shadedPattern>org.eclipse.jetty.start.shaded.util</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
