yegor256/takes

View on GitHub
pom.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>
<!--
The MIT License (MIT)

Copyright (c) 2014-2024 Yegor Bugayenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<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>com.jcabi</groupId>
    <artifactId>parent</artifactId>
    <version>0.68.0</version>
  </parent>
  <groupId>org.takes</groupId>
  <artifactId>takes</artifactId>
  <version>2.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>takes</name>
  <description>True Object-Oriented and Immutable Java Web Framework</description>
  <url>https://github.com/yegor256/takes</url>
  <inceptionYear>2015</inceptionYear>
  <organization>
    <name>Take</name>
    <url>https://github.com/yegor256/takes</url>
  </organization>
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://www.takes.org/LICENSE.txt</url>
      <distribution>site</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>1</id>
      <name>Yegor Bugayenko</name>
      <email>yegor256@gmail.com</email>
      <organization>Zerocracy</organization>
      <organizationUrl>https://www.zerocracy.com</organizationUrl>
      <roles>
        <role>Architect</role>
        <role>Developer</role>
      </roles>
      <timezone>+3</timezone>
    </developer>
    <developer>
      <id>2</id>
      <name>Olivier B. OURA</name>
      <email>baudoliver7@gmail.com</email>
      <organization>Baudoliver7.com</organization>
      <organizationUrl>https://www.baudoliver7.com</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>+0</timezone>
    </developer>
  </developers>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/yegor256/takes/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:git@github.com:yegor256/takes.git</connection>
    <developerConnection>scm:git:git@github.com:yegor256/takes.git
    </developerConnection>
    <url>https://github.com/yegor256/takes</url>
  </scm>
  <ciManagement>
    <system>rultor</system>
    <url>https://www.rultor.com/s/takes</url>
  </ciManagement>
  <distributionManagement>
    <site>
      <id>github-pages</id>
      <url>https://github.com/yegor256/takes</url>
    </site>
  </distributionManagement>
  <properties>
    <timestamp>${maven.build.timestamp}</timestamp>
    <jdk.version>1.8</jdk.version>
    <argLine/>
  </properties>
  <dependencies>
    <!--
    Pay attention that we are NOT allowed to use ANY third-party
    dependencies here, unless they are in PROVIDED, TEST of RUNTIME
    scope. The project must be self-sufficient and work in a single
    JAR dependency.
    -->
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.34</version>
    </dependency>
    <dependency>
      <groupId>org.cactoos</groupId>
      <artifactId>cactoos</artifactId>
      <!--
      @todo #880:30min Once Cactoos is updated to qulice >=0.18.5
       remove all references to Files.newXXX static methods and
       replace them with OO objects such as InputOf or OutputOf
       depending on the need. See
       https://github.com/yegor256/takes/pull/886#issuecomment-446030223
       for details.
      -->
      <version>0.56.1</version>
    </dependency>
    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>2.0.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.json</groupId>
      <artifactId>jakarta.json-api</artifactId>
      <version>2.1.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
      <version>6.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <version>4.0.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-http</artifactId>
      <version>2.0.0</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-xml</artifactId>
      <version>0.30.0</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity-engine-core</artifactId>
      <version>2.4.1</version>
      <scope>compile</scope>
      <optional>true</optional>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.jcabi.incubator</groupId>
      <artifactId>xembly</artifactId>
      <version>0.31.1</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
      <version>4.13.2</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.restfb</groupId>
      <artifactId>restfb</artifactId>
      <version>2.27.1</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <version>3.0</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.glassfish.grizzly</groupId>
      <artifactId>grizzly-http-servlet-server</artifactId>
      <version>4.0.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.glassfish.grizzly</groupId>
          <artifactId>grizzly-npn-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.eclipse.parsson</groupId>
      <artifactId>jakarta.json</artifactId>
      <version>1.1.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.17.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.llorllale</groupId>
      <artifactId>cactoos-matchers</artifactId>
      <version>0.25</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-matchers</artifactId>
      <version>1.7.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-log</artifactId>
      <version>0.24.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.ws.rs</groupId>
      <artifactId>jakarta.ws.rs-api</artifactId>
      <version>3.1.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
      <version>3.1.9</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-server</artifactId>
      <version>3.1.9</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>net.sf.saxon</groupId>
      <artifactId>Saxon-HE</artifactId>
      <version>12.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.el</groupId>
      <artifactId>javax.el-api</artifactId>
      <version>3.0.1-b06</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.0.13</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-reload4j</artifactId>
      <version>2.0.13</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>ch.qos.reload4j</groupId>
          <artifactId>reload4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.6</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.11.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>5.14.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.14.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <scope>test</scope>
      <version>1.11.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>annotations</artifactId>
      <version>3.0.1u2</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>net.jcip</groupId>
          <artifactId>jcip-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.code.findbugs</groupId>
          <artifactId>jsr305</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <filtering>true</filtering>
        <directory>${project.basedir}/src/test/resources</directory>
        <excludes>
          <exclude>org/takes/http/keystore</exclude>
        </excludes>
      </testResource>
      <!--
      This is not a typo. We need to copy resources twice, one
      time with filtering, second time without. Why? I don't know. But
      if you remove one of these blocks, the build will fail. If you have
      time and energy, try to figure out what's going on here and either
      remove one of these blocks or improve this XML comment and explain
      properly why we need this configuration.
      -->
      <testResource>
        <filtering>false</filtering>
        <directory>${project.basedir}/src/test/resources</directory>
        <includes>
          <include>org/takes/http/keystore</include>
        </includes>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>2.4.0</version>
        <executions>
          <execution>
            <id>check-licenses</id>
            <phase>verify</phase>
            <goals>
              <goal>check-file-header</goal>
            </goals>
            <configuration>
              <licenseName>mit</licenseName>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludedGroups>org.takes.misc.PerformanceTests</excludedGroups>
          <systemPropertyVariables>
            <argLine>@{argLine} -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.country=US</argLine>
            <javax.net.ssl.keyStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.keyStore>
            <javax.net.ssl.keyStorePassword>abc123
            </javax.net.ssl.keyStorePassword>
            <javax.net.ssl.trustStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.trustStore>
            <javax.net.ssl.trustStorePassword>abc123</javax.net.ssl.trustStorePassword>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>post-site</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/site</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.basedir}/src/www.takes.org</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${jdk.version}</source>
          <target>${jdk.version}</target>
          <useIncrementalCompilation>false</useIncrementalCompilation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-verifier-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>main</id>
            <phase>package</phase>
            <goals>
              <goal>verify</goal>
            </goals>
            <configuration>
              <verificationFile>src/verifier/verifications.xml</verificationFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.basepom.maven</groupId>
        <artifactId>duplicate-finder-maven-plugin</artifactId>
        <version>2.0.1</version>
        <configuration>
          <ignoredDependencies>
            <dependency>
              <groupId>javax.json</groupId>
              <artifactId>javax.json-api</artifactId>
              <version>1.1.4</version>
            </dependency>
            <dependency>
              <groupId>javax.xml.bind</groupId>
              <artifactId>jaxb-api</artifactId>
              <version>2.3.1</version>
            </dependency>
          </ignoredDependencies>
        </configuration>
        <!--
        @todo #958:30min duplicate-finder-maven-plugin found module-info as duplicate
         and different class in [javax.json:javax.json-api:1.1,javax.xml.bind:jaxb-api:2.3.0].
         After resolving duplicatefinder in Qulice, remove this plugin and configure qulice
         plugin to enable these exclusions (see at https://www.qulice.com/qulice-maven-plugin/example-exclude.html).
        -->
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>performance</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.5.1</version>
            <configuration>
              <groups>org.takes.misc.PerformanceTests</groups>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>qulice</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-maven-plugin</artifactId>
            <version>0.22.0</version>
            <configuration>
              <excludes>
                <exclude>checkstyle:/src/site/resources/.*</exclude>
                <exclude>duplicatefinder:.*</exclude>
                <exclude>dependencies:.*</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>site</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-invoker-plugin</artifactId>
              <configuration>
                <skipInvocation>true</skipInvocation>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>sonar</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>sonar-maven-plugin</artifactId>
            <version>4.0.0.4121</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>sonar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist -->
      <id>java-xml-bind</id>
      <activation>
        <jdk>[1.11,)</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>jakarta.xml.bind</groupId>
          <artifactId>jakarta.xml.bind-api</artifactId>
          <version>4.0.2</version>
        </dependency>
        <dependency>
          <groupId>com.sun.xml.bind</groupId>
          <artifactId>jaxb-core</artifactId>
          <version>4.0.5</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>com.sun.xml.bind</groupId>
          <artifactId>jaxb-impl</artifactId>
          <version>4.0.5</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>