This is an automated email from the ASF dual-hosted git repository. ifropc pushed a commit to branch NLPCRAFT-91 in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 2200817e05db95cfd751f1b32076f742c2eb186a Author: Ifropc <[email protected]> AuthorDate: Sun Dec 13 15:38:19 2020 -0800 NLPCRAFT-91: Initial files --- nlpcraft-examples/pom.xml | 91 ++++++++++++++++++++++ .../kotlin/org/apache/nlpcraft/example/Example.kt | 23 ++++++ .../org/apache/nlpcraft/example/ExampleTest.kt | 32 ++++++++ pom.xml | 7 ++ 4 files changed, 153 insertions(+) diff --git a/nlpcraft-examples/pom.xml b/nlpcraft-examples/pom.xml new file mode 100644 index 0000000..97637b5 --- /dev/null +++ b/nlpcraft-examples/pom.xml @@ -0,0 +1,91 @@ +<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" + 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> + + <name>NLPCraft - Examples</name> + <artifactId>nlpcraft-examples</artifactId> + + <parent> + <groupId>org.apache.nlpcraft</groupId> + <artifactId>nlpcraft-parent</artifactId> + <version>0.7.2</version> + <relativePath>../</relativePath> + </parent> + + <properties> + <kotlin.ver>1.4.10</kotlin.ver> + </properties> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>nlpcraft</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.jetbrains.kotlin</groupId> + <artifactId>kotlin-stdlib</artifactId> + <version>${kotlin.ver}</version> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.jetbrains.kotlin</groupId> + <artifactId>kotlin-maven-plugin</artifactId> + <version>${kotlin.ver}</version> + <executions> + <execution> + <id>compile</id> + <phase>compile</phase> + <goals> + <goal>compile</goal> + </goals> + <configuration> + <sourceDirs> + <sourceDir>src/main/kotlin</sourceDir> + </sourceDirs> + </configuration> + </execution> + <execution> + <id>test-compile</id> + <phase>test-compile</phase> + <goals> + <goal>test-compile</goal> + </goals> + <configuration> + <sourceDirs> + <sourceDir>src/test/kotlin</sourceDir> + </sourceDirs> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt new file mode 100644 index 0000000..2591725 --- /dev/null +++ b/nlpcraft-examples/src/main/kotlin/org/apache/nlpcraft/example/Example.kt @@ -0,0 +1,23 @@ +/* + * 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. + * + */ + +package org.apache.nlpcraft.example + +fun testExample() { + print("Test") +} \ No newline at end of file diff --git a/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt b/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt new file mode 100644 index 0000000..6b25e48 --- /dev/null +++ b/nlpcraft-examples/src/test/kotlin/org/apache/nlpcraft/example/ExampleTest.kt @@ -0,0 +1,32 @@ +/* + * 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. + * + */ + +package org.apache.nlpcraft.example + +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test + +class ExampleTest { + @Test + fun testPass() { + testExample() + + Assertions.assertTrue(true) + } +} + diff --git a/pom.xml b/pom.xml index cf25aff..e473ddf 100644 --- a/pom.xml +++ b/pom.xml @@ -727,6 +727,13 @@ </profile> <profile> + <id>examples</id> + <modules> + <module>nlpcraft-examples</module> + </modules> + </profile> + + <profile> <id>release</id> <activation> <property>
