blob: fec112eb4cdc12e4605ae474194a3548b5ee7b41 [file] [log] [blame]
<?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>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<apache.httpcomponents.ver>4.5.13</apache.httpcomponents.ver>
<apache.common.lang.ver>3.11</apache.common.lang.ver>
<commons.validator.ver>1.7</commons.validator.ver>
<gson.ver>2.8.6</gson.ver>
<log4j.ver>2.14.0</log4j.ver>
<nlpcraft.ver>0.9.0</nlpcraft.ver>
<junit.ver>5.7.0</junit.ver>
<maven.compiler.version>3.8.0</maven.compiler.version>
<maven.shade.plugin.ver>3.2.4</maven.shade.plugin.ver>
<maven.source.plugin.ver>3.0.1</maven.source.plugin.ver>
<maven.gpg.plugin.ver>1.6</maven.gpg.plugin.ver>
<maven.enforcer.plugin.ver>1.4.1</maven.enforcer.plugin.ver>
<maven.surefire.plugin.ver>2.22.2</maven.surefire.plugin.ver>
<maven.javadoc.plugin.ver>3.2.0</maven.javadoc.plugin.ver>
<maven.jar.plugin.ver>3.2.0</maven.jar.plugin.ver>
<apache.rat.plugin.ver>0.13</apache.rat.plugin.ver>
<maven.bazaarvoice.plugin.ver>0.9</maven.bazaarvoice.plugin.ver>
<maven.clean.plugin.ver>3.1.0</maven.clean.plugin.ver>
<maven.dependency.plugin.ver>3.0.2</maven.dependency.plugin.ver>
</properties>
<name>NLPCraft - Java Client</name>
<groupId>org.apache.nlpcraft</groupId>
<artifactId>java-client</artifactId>
<version>0.9.0</version>
<url>https://nlpcraft.apache.org</url>
<description>An open source API to convert natural language into actions.</description>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>10</version>
</parent>
<developers>
<developer>
<id>aradzinski</id>
<name>Aaron Radzinski</name>
<email>aradzinski@apache.org</email>
<organization>apache</organization>
<organizationUrl>http://apache.org</organizationUrl>
<roles>
<role>architect</role>
</roles>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<scm>
<url>https://github.com/apache/incubator-nlpcraft.git</url>
<connection>scm:git:ssh://git@github.com/apache/incubator-nlpcraft.git</connection>
<developerConnection>scm:git:ssh://git@github.com/apache/incubator-nlpcraft.git</developerConnection>
<!-- Set actual tag name here -->
<tag>v0.9.0</tag>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${apache.httpcomponents.ver}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${apache.common.lang.ver}</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>${commons.validator.ver}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.ver}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.ver}</version>
</dependency>
<dependency>
<groupId>org.apache.nlpcraft</groupId>
<artifactId>nlpcraft</artifactId>
<version>${nlpcraft.ver}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.ver}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven.enforcer.plugin.ver}</version>
<configuration>
<rules>
<requireJavaVersion>
<message>
------------------------------------------------------------------------
You are trying to compile NLPCraft with inappropriate JDK version!
Detected JDK Version: ${java.runtime.version}
JDK version should be 11 or later
------------------------------------------------------------------------
</message>
<version>11</version>
</requireJavaVersion>
</rules>
</configuration>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.ver}</version>
<configuration>
<additionalOptions>--allow-script-in-comments, -Xdoclint:none</additionalOptions>
<javadocDirectory>${project.basedir}/javadoc</javadocDirectory>
<docfilessubdirs>true</docfilessubdirs>
<encoding>UTF-8</encoding>
<failOnError>false</failOnError>
<sourcepath>${project.basedir}/src/main/java</sourcepath>
<stylesheetfile>${project.basedir}/javadoc/stylesheet.css</stylesheetfile>
<bottom>
<![CDATA[
<center>
<br/>
<span style="font-size: larger">Copyright &#169; {currentYear} Apache Software Foundation</span>
<br/>
<br/>
<img src="https://www.apache.org/img/ASF20thAnniversary.jpg" height="64px">
</center>
]]>
</bottom>
<top>
<![CDATA[
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script src="{@docRoot}/resources/sh/scripts/XRegExp.js" type="text/javascript"></script>
<script src="{@docRoot}/resources/sh/scripts/shCore.js" type="text/javascript"></script>
<script src="{@docRoot}/resources/sh/scripts/shAutoloader.js" type="text/javascript"></script>
<link href="{@docRoot}/resources/sh/styles/shCoreNlpCraft.css" rel="stylesheet" type="text/css" title="Style">
<link href="{@docRoot}/resources/sh/styles/shThemeNlpCraft.css" rel="stylesheet" type="text/css" title="Style">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script async defer src="https://buttons.github.io/buttons.js"></script>
]]>
</top>
<!-- Disabled because of https://bugs.openjdk.java.net/browse/JDK-8193030 -->
<!-- <subpackages>org.apache.nlpcraft.client</subpackages> -->
<excludePackageNames>
org.apache.nlpcraft.client.impl:org.apache.nlpcraft.client.impl.beans
</excludePackageNames>
<groups>
<group>
<title>Apache NLPCraft - Java Client</title>
<packages>
org.apache.nlpcraft.client
</packages>
</group>
</groups>
<header>
<![CDATA[
Apache NLPCraft - Java Client <span style="font-size: 80%">${project.version}</span>
]]>
</header>
<footer>
<![CDATA[
<span style="vertical-align: super">Apache NLPCraft - Java Client ${project.version}</span>
<a style="vertical-align: super; margin-right: 10px" href="https://github.com/apache/incubator-nlpcraft-java-client" target="github"><i class="fa fa-github github-logo"></i></a>
<a class="github-button" href="https://github.com/apache/incubator-nlpcraft-java-client/subscription" data-icon="octicon-eye" aria-label="Watch on GitHub">Watch</a>
<a class="github-button" href="https://github.com/apache/incubator-nlpcraft-java-client" data-icon="octicon-star" aria-label="Star on GitHub">Star</a>
<a class="github-button" href="https://github.com/apache/incubator-nlpcraft-java-client/fork" data-icon="octicon-repo-forked" aria-label="Fork on GitHub">Fork</a>
<script type="text/javascript">
SyntaxHighlighter.defaults["auto-links"] = false;
SyntaxHighlighter.defaults["tab-size"] = 2;
SyntaxHighlighter.autoloader(
'java {@docRoot}/resources/sh/scripts/shBrushJava.js',
'js jscript javascript {@docRoot}/resources/sh/scripts/shBrushJScript.js',
'text plain {@docRoot}/resources/sh/scripts/shBrushPlain.js',
'py python {@docRoot}/resources/sh/scripts/shBrushPython.js',
'ruby rails ror rb {@docRoot}/resources/sh/scripts/shBrushRuby.js',
'scala {@docRoot}/resources/sh/scripts/shBrushScala.js',
'sql {@docRoot}/resources/sh/scripts/shBrushSql.js',
'xml xhtml xslt html {@docRoot}/resources/sh/scripts/shBrushXml.js'
);
SyntaxHighlighter.all();
</script>
]]>
</footer>
<doctitle>
<![CDATA[
<img style="margin-top: 15px" src="https://nlpcraft.apache.org/images/nlpcraft_logo_darkblue.png" height="54px">
]]>
</doctitle>
<windowtitle>Apache NLPCraft - Java Client ${project.version}</windowtitle>
<show>public</show>
<verbose>false</verbose>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.ver}</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.ver}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Copy server dependencies for integration tests. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven.dependency.plugin.ver}</version>
<executions>
<execution>
<id>copy-server-dependencies</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/server-lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Start server for integration tests. -->
<plugin>
<groupId>com.bazaarvoice.maven.plugins</groupId>
<artifactId>process-exec-maven-plugin</artifactId>
<version>${maven.bazaarvoice.plugin.ver}</version>
<executions>
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<!--
Depending on the console config and how maven is run this will produce the output with ANSI colors.
To strip out ANSI escape sequences from the log file, see the following:
https://stackoverflow.com/questions/17998978/removing-colors-from-output
-->
<name>server</name>
<healthcheckUrl>http://localhost:8081/api/v1/health</healthcheckUrl>
<waitAfterLaunch>600</waitAfterLaunch>
<arguments>
<argument>${java.home}/bin/java</argument>
<argument>-Xmx4G</argument>
<argument>-Xms4G</argument>
<argument>--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED</argument>
<argument>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED</argument>
<argument>--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED</argument>
<argument>--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</argument>
<argument>--add-exports=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED</argument>
<argument>--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED</argument>
<argument>--illegal-access=permit</argument>
<argument>-DNLPCRAFT_ANSI_COLOR_DISABLED=true</argument> <!-- Remove ANSI at least from NLPCraft output. -->
<argument>-Djdk.tls.client.protocols=TLSv1.2</argument>
<argument>-cp</argument>
<argument>${project.build.directory}/server-lib/*</argument>
<argument>org.apache.nlpcraft.server.NCServer</argument>
<argument>-server</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>stop-all</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-all</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Run integration tests. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.ver}</version>
<configuration>
<!-- Skips all tests on phase `test`. -->
<skip>true</skip>
</configuration>
<executions>
<!-- All tests are defined as integration. -->
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<!-- Mandatory part. -->
<includes>
<include>**/*.*</include>
</includes>
<excludes>
<!--
Some tests skipped on maven `verify` phase.
===========================================
-->
<!-- Reason: 'contextWordServer' should be started. -->
<exclude>**/NCModelTest2.*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${apache.rat.plugin.ver}</version>
<configuration>
<excludes>
<exclude>.gitignore</exclude>
<exclude>build</exclude>
<exclude>.idea/**/*</exclude>
<exclude>.git/**/*</exclude>
<exclude>*.iml</exclude>
<exclude>**/*.txt</exclude>
<exclude>idea/**/*</exclude>
<exclude>zips/**/*</exclude>
<exclude>javadoc/**/*</exclude>
</excludes>
<numUnapprovedLicenses>1000000</numUnapprovedLicenses>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.plugin.ver}</version>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>