<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<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>

  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>27.0.0.redhat-00004</version>
  </parent>

  <groupId>org.apache.tomcat</groupId>
  <artifactId>jakartaee-migration</artifactId>
  <version>1.0.6.redhat-00003</version>
  <name>Apache Tomcat Migration Tool for Jakarta EE</name>

  <description>The aim of the tool is to take a web application written for Java EE 8 that
    runs on Apache Tomcat 9 and convert it automatically so it runs on Apache
    Tomcat 10 which implements Jakarta EE 9.</description>
  <!-- TODO: Update this once the web site is updated. -->
  <url>https://tomcat.apache.org</url>
  <inceptionYear>2020</inceptionYear>

  <mailingLists>
    <mailingList>
      <name>Apache Tomcat Announce List</name>
      <subscribe>announce-subscribe@tomcat.apache.org</subscribe>
      <unsubscribe>announce-unsubscribe@tomcat.apache.org</unsubscribe>
      <archive>https://lists.apache.org/list.html?announce@tomcat.apache.org</archive>
    </mailingList>
    <mailingList>
      <name>Apache Tomcat Developer List</name>
      <subscribe>dev-subscribe@tomcat.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@tomcat.apache.org</unsubscribe>
      <post>dev@tomcat.apache.org</post>
      <archive>https://lists.apache.org/list.html?dev@tomcat.apache.org</archive>
    </mailingList>
    <mailingList>
      <name>Apache Tomcat Users List</name>
      <subscribe>users-subscribe@tomcat.apache.org</subscribe>
      <unsubscribe>users-unsubscribe@tomcat.apache.org</unsubscribe>
      <post>users@tomcat.apache.org</post>
      <archive>https://lists.apache.org/list.html?users@tomcat.apache.org</archive>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git</connection>
    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git</developerConnection>
    <tag>1.0.6</tag>
    <url>https://gitbox.apache.org/repos/asf?p=tomcat-jakartaee-migration.git</url>
  </scm>

  <properties>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <!-- Override settings from parent POM -->
    <sourceReleaseAssemblyDescriptor>src</sourceReleaseAssemblyDescriptor>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.bcel</groupId>
      <artifactId>bcel</artifactId>
      <version>6.6.1.redhat-00001</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.23.0.redhat-00001</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.13.0.redhat-00001</version>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.10.12</version>
      <scope>provided</scope>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <!-- Customise the default ASF release profile -->
    <profile>
      <id>apache-release</id>
      <build>
        <plugins>
          <!--
            Disable the default src packaging. Project specific src packaging is
            provided under the ID 'make-assembly' below.
          -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>source-release-assembly</id>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>create-test-jars</id>
            <goals>
              <goal>run</goal>
            </goals>
            <phase>process-test-classes</phase>
            <configuration>
              <target>
                <jar basedir="target/test-classes" destfile="target/test-classes/cgi-api.jar" includes="**/CommonGatewayInterface*" />
                <jar basedir="target/test-classes" destfile="target/test-classes/hellocgi.jar" includes="**/HelloCGI*">
                  <manifest>
                    <attribute name="Implementation-Version" value="1.2.3" />
                  </manifest>
                </jar>

                <!-- Generate the signed jar files -->
                <!--
                  The keystore contains 3 keys (RSA, DSA and EC) and was generated with Java 12:
                    keytool -genkey -validity 3650 -keystore keystore.p12 -storetype pkcs12 -dname CN=Test -alias rsa -keyalg RSA -keysize 1024
                    keytool -genkey -validity 3650 -keystore keystore.p12 -storetype pkcs12 -dname CN=Test -alias dsa -keyalg DSA -keysize 1024
                    keytool -genkey -validity 3650 -keystore keystore.p12 -storetype pkcs12 -dname CN=Test -alias ec  -keyalg EC  -groupname secp384r1
                -->
                <parallel>
                  <sequential>
                    <copy file="target/test-classes/hellocgi.jar" tofile="target/test-classes/hellocgi-signed-rsa.jar" />
                    <signjar alias="rsa" jar="target/test-classes/hellocgi-signed-rsa.jar" keystore="src/test/resources/keystore.p12" storepass="apache" />
                  </sequential>
                  <sequential>
                    <copy file="target/test-classes/hellocgi.jar" tofile="target/test-classes/hellocgi-signed-dsa.jar" />
                    <signjar alias="dsa" jar="target/test-classes/hellocgi-signed-dsa.jar" keystore="src/test/resources/keystore.p12" storepass="apache" />
                  </sequential>
                  <sequential>
                    <copy file="target/test-classes/hellocgi.jar" tofile="target/test-classes/hellocgi-signed-ec.jar" />
                    <signjar alias="ec" jar="target/test-classes/hellocgi-signed-ec.jar" keystore="src/test/resources/keystore.p12" storepass="apache" />
                  </sequential>
                </parallel>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <reuseForks>false</reuseForks>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <mainClass>org.apache.tomcat.jakartaee.MigrationCLI</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- NOTE: We don't need a groupId specification because the group is
             org.apache.maven.plugins ...which is assumed by default.
         -->
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.4.2</version>
        <executions>
          <execution>
            <id>make-assembly</id>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <descriptors>
                <descriptor>src/assembly/bin.xml</descriptor>
                <descriptor>src/assembly/src.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <minimizeJar>true</minimizeJar>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <filters>
                <filter>
                  <artifact>org.apache.bcel:*</artifact>
                  <excludes>
                    <exclude>META-INF/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.apache.commons:*</artifact>
                  <excludes>
                    <exclude>META-INF/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>commons-io:*</artifact>
                  <excludes>
                    <exclude>META-INF/**</exclude>
                  </excludes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>org.apache.tomcat.jakartaee.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.bcel</pattern>
                  <shadedPattern>org.apache.tomcat.jakartaee.bcel</shadedPattern>
                </relocation>
              </relocations>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <manifestEntries>
                    <Class-Path />
                  </manifestEntries>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.8</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <configLocation>src/checkstyle/checkstyle.xml</configLocation>
          <headerLocation>src/checkstyle/header-al2.txt</headerLocation>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <linkXRef>false</linkXRef>
        </configuration>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement />
  </build>

</project>
<!--
Modified by POM Manipulation Extension for Maven 4.16 ( SHA: 352ae4a7 )
-->
