From 7c612ae5e351742c98233d75689efa7f6ef8c60e Mon Sep 17 00:00:00 2001 From: gserrano Date: Wed, 14 Oct 2020 19:59:41 -0500 Subject: [PATCH 01/10] [component-kotlin] archetype for creating spring component in Kotlin. --- component-kotlin/.gitignore | 6 + component-kotlin/.oss-build | 0 component-kotlin/pom.xml | 238 ++++++++++++++++ .../META-INF/maven/archetype-metadata.xml | 55 ++++ .../resources/archetype-resources/pom.xml | 264 ++++++++++++++++++ .../src/main/java/ComponentJava.java | 29 ++ .../main/java/ComponentJavaConfiguration.java | 38 +++ .../src/main/kotlin/ComponentKotlin.kt | 19 ++ .../kotlin/ComponentKotlinConfiguration.kt | 38 +++ .../java/ComponentJavaConfigurationTest.java | 39 +++ .../src/test/java/ComponentJavaTest.java | 25 ++ .../ComponentKotlinConfigurationTest.kt | 29 ++ .../src/test/kotlin/ComponentKotlinTest.kt | 25 ++ .../test-component/archetype.properties | 22 ++ .../projects/test-component/goal.txt | 1 + pom.xml | 3 +- 16 files changed, 830 insertions(+), 1 deletion(-) create mode 100644 component-kotlin/.gitignore create mode 100644 component-kotlin/.oss-build create mode 100644 component-kotlin/pom.xml create mode 100644 component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 component-kotlin/src/main/resources/archetype-resources/pom.xml create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJava.java create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJavaConfiguration.java create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlin.kt create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaConfigurationTest.java create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaTest.java create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinConfigurationTest.kt create mode 100644 component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinTest.kt create mode 100644 component-kotlin/src/test/resources/projects/test-component/archetype.properties create mode 100644 component-kotlin/src/test/resources/projects/test-component/goal.txt diff --git a/component-kotlin/.gitignore b/component-kotlin/.gitignore new file mode 100644 index 0000000..5366292 --- /dev/null +++ b/component-kotlin/.gitignore @@ -0,0 +1,6 @@ +target/ +*.iml +.idea +.classpath +.project +.DS_Store diff --git a/component-kotlin/.oss-build b/component-kotlin/.oss-build new file mode 100644 index 0000000..e69de29 diff --git a/component-kotlin/pom.xml b/component-kotlin/pom.xml new file mode 100644 index 0000000..e9a0d33 --- /dev/null +++ b/component-kotlin/pom.xml @@ -0,0 +1,238 @@ + + + + + 4.0.0 + + com.opentable + otj-spring-archetypes + 0.0.9-SNAPSHOT + + + spring-archetype-component-kotlin + maven-archetype + OpenTable Spring Component archetype for Kotlin + + + + 11 + 1.4.10 + official + true + 1.6.2 + + + + + + org.slf4j + slf4j-api + + + + + org.springframework + spring-beans + + + javax.inject + javax.inject + + + org.springframework + spring-context + + + + + org.jetbrains.kotlin + kotlin-stdlib + + + org.jetbrains + annotations + + + org.jetbrains.kotlin + kotlin-test + test + + + + + junit + junit + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.junit.vintage + junit-vintage-engine + test + + + + + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-stdlib + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-stdlib-common + ${dep.kotlin.version} + + + org.jetbrains + annotations + 13.0 + + + org.jetbrains.kotlin + kotlin-test + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-common + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-annotations-common + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-junit + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-junit5 + ${dep.kotlin.version} + + + org.junit.platform + junit-platform-engine + ${dep.junit-platform.version} + + + org.junit.platform + junit-platform-commons + ${dep.junit-platform.version} + + + + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${dep.kotlin.version} + + + spring + + + + + compile + compile + + compile + + + + src/main/java + src/main/kotlin + + + + + test-compile + test-compile + + test-compile + + + + src/test/java + src/test/kotlin + + + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${dep.kotlin.version} + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${dep.plugin.compiler.version} + + + default-compile + none + + + default-testCompile + none + + + java-compile + compile + + compile + + + + java-testCompile + test-compile + + testCompile + + + + + + + diff --git a/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml b/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..b1b6f2e --- /dev/null +++ b/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,55 @@ + + + + + + + 256 + + + + + src/main/java + + **/*.java + **/*.kt + + + + src/main/kotlin + + **/*.java + **/*.kt + + + + src/test/java + + **/*.java + **/*.kt + + + + src/test/kotlin + + **/*.java + **/*.kt + + + + diff --git a/component-kotlin/src/main/resources/archetype-resources/pom.xml b/component-kotlin/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..c35d6d7 --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,264 @@ + +## Licensed 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. + + + + 4.0.0 + + com.opentable + otj-parent-spring + ${otj-parent-version} + + + + scm:git:git://github.com/opentable/${project.artifactId}.git + scm:git:git@github.com:opentable/${project.artifactId}.git + http://github.com/opentable/${project.artifactId} + HEAD + + + ${groupId} + ${artifactId} + 1.0.0-SNAPSHOT + Automatically generated description, fill me in! + + + 11 + 1.4.10 + official + true + 13.0 + 1.6.2 + + + + + + org.jetbrains.kotlin + kotlin-stdlib + + + org.jetbrains + annotations + + + + + + org.slf4j + slf4j-api + + + + + org.springframework + spring-beans + + + org.springframework + spring-context + + + javax.inject + javax.inject + + + + + junit + junit + test + + + org.springframework + spring-test + test + + + org.springframework.boot + spring-boot-test + test + + + org.slf4j + slf4j-simple + test + + + org.assertj + assertj-core + test + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.junit.vintage + junit-vintage-engine + test + + + + + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-stdlib + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-stdlib-common + ${dep.kotlin.version} + + + org.jetbrains + annotations + ${dep.jetbrails.annotations.version} + + + org.jetbrains.kotlin + kotlin-test + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-common + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-annotations-common + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-junit + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-junit5 + ${dep.kotlin.version} + + + org.junit.platform + junit-platform-engine + ${dep.junit-platform.version} + + + org.junit.platform + junit-platform-commons + ${dep.junit-platform.version} + + + + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${dep.kotlin.version} + + + spring + + + + + compile + compile + + compile + + + + src/main/java + src/main/kotlin + + + + + test-compile + test-compile + + test-compile + + + + src/test/java + src/test/kotlin + + + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${dep.kotlin.version} + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${dep.plugin.compiler.version} + + + default-compile + none + + + default-testCompile + none + + + java-compile + compile + + compile + + + + java-testCompile + test-compile + + testCompile + + + + + + + diff --git a/component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJava.java b/component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJava.java new file mode 100644 index 0000000..58de85c --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJava.java @@ -0,0 +1,29 @@ +## Licensed 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 ${package}; + +/** + * A simple Spring managed bean. + * You'll probably want to do something more than + * store a String. + */ +public class ComponentJava { + private final String configurable; + + public ComponentJava(String configurable) { + this.configurable = configurable; + } + + public String getConfigurable() { + return configurable; + } +} diff --git a/component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJavaConfiguration.java b/component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJavaConfiguration.java new file mode 100644 index 0000000..9da28cf --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/main/java/ComponentJavaConfiguration.java @@ -0,0 +1,38 @@ +## Licensed 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. +#set( $D = '$' ) +#set( $H = '#' ) +package ${package}; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * A Spring Configuration class for our ComponentJava. + * Inject configuration values, set up your beans, etc. + */ +@Configuration +public class ComponentJavaConfiguration { + private static final Logger LOG = LoggerFactory.getLogger(ComponentJavaConfiguration.class); + + @Value("${D}{ot.component.config:${H}{null}}") + private String configurable; + + @Bean + public ComponentJava component() { + LOG.info("Initializing Component (Java) with configurable {}", configurable); + return new ComponentJava(configurable); + } +} diff --git a/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlin.kt b/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlin.kt new file mode 100644 index 0000000..1f2e7b7 --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlin.kt @@ -0,0 +1,19 @@ +## Licensed 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 ${package} + +/** + * A simple Spring managed bean. + * You'll probably want to do something more than + * store a String. + */ +class ComponentKotlin(val configurable: String) diff --git a/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt b/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt new file mode 100644 index 0000000..32d5650 --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt @@ -0,0 +1,38 @@ +## Licensed 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. +#set( $D = '\$' ) +#set( $H = '#' ) +package ${package} + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * A Spring Configuration class for our ComponentJava. + * Inject configuration values, set up your beans, etc. + */ +@Configuration +class ComponentKotlinConfiguration(@Value("${D}{ot.component.config:${H}{null}}") val configurable: String) { + @Bean + fun component(): ComponentKotlin { + LOG.info("Initializing Component (Kotlin) with configurable {}", configurable) + return ComponentKotlin(configurable) + } + + companion object { + @JvmStatic + val LOG: Logger = LoggerFactory.getLogger(ComponentJavaConfiguration::class.java) + } +} diff --git a/component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaConfigurationTest.java b/component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaConfigurationTest.java new file mode 100644 index 0000000..46771de --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaConfigurationTest.java @@ -0,0 +1,39 @@ +## Licensed 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 ${package}; + +import static org.assertj.core.api.Assertions.assertThat; + +import javax.inject.Inject; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringRunner; + +@ContextConfiguration(classes= { + ComponentJavaConfiguration.class +}) +@TestPropertySource(properties= { + "ot.component.config=foo" +}) +@RunWith(SpringRunner.class) +public class ComponentJavaConfigurationTest { + @Inject + ComponentJava componentJava; + + @Test + public void testComponentJava() { + assertThat(componentJava.getConfigurable()).isEqualTo("foo"); + } +} diff --git a/component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaTest.java b/component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaTest.java new file mode 100644 index 0000000..170083f --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/test/java/ComponentJavaTest.java @@ -0,0 +1,25 @@ +## Licensed 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 ${package}; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; + +public class ComponentJavaTest { + @Test + public void testComponentJava() { + final String foo = "foo"; + ComponentJava c = new ComponentJava(foo); + assertThat(c.getConfigurable()).isEqualTo(foo); + } +} diff --git a/component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinConfigurationTest.kt b/component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinConfigurationTest.kt new file mode 100644 index 0000000..fe80f73 --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinConfigurationTest.kt @@ -0,0 +1,29 @@ +## Licensed 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 ${package} + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.test.context.SpringBootTest + +@SpringBootTest( + properties = ["ot.component.config=foo"], + classes = [ComponentKotlinConfiguration::class] +) +// must be @Autowired not @Inject +class ComponentKotlinConfigurationTest(@Autowired var componentKotlin: ComponentKotlin) { + @Test + fun testComponentKotlin() { + assertThat(componentKotlin.configurable).isEqualTo("foo") + } +} diff --git a/component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinTest.kt b/component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinTest.kt new file mode 100644 index 0000000..dca9a9b --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/src/test/kotlin/ComponentKotlinTest.kt @@ -0,0 +1,25 @@ +## Licensed 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 ${package} + +import org.assertj.core.api.Assertions.assertThat + +import org.junit.jupiter.api.Test + +class ComponentKotlinTest { + @Test + fun testComponentLotlin() { + val foo = "foo" + val c = ComponentKotlin(foo) + assertThat(c.configurable).isEqualTo(foo) + } +} diff --git a/component-kotlin/src/test/resources/projects/test-component/archetype.properties b/component-kotlin/src/test/resources/projects/test-component/archetype.properties new file mode 100644 index 0000000..85db15a --- /dev/null +++ b/component-kotlin/src/test/resources/projects/test-component/archetype.properties @@ -0,0 +1,22 @@ +# +# Licensed 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. +# + +groupId=com.opentable.it +artifactId=component-it +version=0.1.2-SNAPSHOT +package=com.opentable.it +otj-parent-version=256 +archetype.filteredExtensions=java,kt,kotlin +archetype.languages=groovy,kotlin,kt + diff --git a/component-kotlin/src/test/resources/projects/test-component/goal.txt b/component-kotlin/src/test/resources/projects/test-component/goal.txt new file mode 100644 index 0000000..4a1a71d --- /dev/null +++ b/component-kotlin/src/test/resources/projects/test-component/goal.txt @@ -0,0 +1 @@ +verify \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1e679c9..909de1f 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ com.opentable otj-parent-spring - 180 + 256 @@ -39,6 +39,7 @@ component + component-kotlin service service-mvc From 7d26ac6f8d41eb43156a6c9679ae7f8b87d2ae4d Mon Sep 17 00:00:00 2001 From: gserrano Date: Thu, 15 Oct 2020 16:03:38 -0500 Subject: [PATCH 02/10] [service-mvc-kotlin] archetype for creating spring mvc service in Kotlin. --- archetype-catalog.xml | 6 + component-kotlin/.gitignore | 6 - .../META-INF/maven/archetype-metadata.xml | 4 +- pom.xml | 1 + service-mvc-kotlin/.oss-build | 0 service-mvc-kotlin/pom.xml | 50 ++++ .../META-INF/maven/archetype-metadata.xml | 60 ++++ .../archetype-resources/.build-service | 0 .../resources/archetype-resources/pom.xml | 275 ++++++++++++++++++ .../src/main/kotlin/Main.kt | 44 +++ .../src/main/kotlin/MyController.kt | 23 ++ .../src/test/kotlin/MainTest.kt | 40 +++ .../test-service/archetype.properties | 19 ++ .../resources/projects/test-service/goal.txt | 1 + 14 files changed, 520 insertions(+), 9 deletions(-) delete mode 100644 component-kotlin/.gitignore create mode 100644 service-mvc-kotlin/.oss-build create mode 100644 service-mvc-kotlin/pom.xml create mode 100644 service-mvc-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 service-mvc-kotlin/src/main/resources/archetype-resources/.build-service create mode 100644 service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml create mode 100644 service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/Main.kt create mode 100644 service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/MyController.kt create mode 100644 service-mvc-kotlin/src/main/resources/archetype-resources/src/test/kotlin/MainTest.kt create mode 100644 service-mvc-kotlin/src/test/resources/projects/test-service/archetype.properties create mode 100644 service-mvc-kotlin/src/test/resources/projects/test-service/goal.txt diff --git a/archetype-catalog.xml b/archetype-catalog.xml index f2991db..8a96e4e 100644 --- a/archetype-catalog.xml +++ b/archetype-catalog.xml @@ -20,5 +20,11 @@ RELEASE OpenTable Spring MVC Service archetype + + com.opentable + spring-archetype-service-mvc-kotlin + RELEASE + OpenTable Spring MVC Service Kotlin archetype + diff --git a/component-kotlin/.gitignore b/component-kotlin/.gitignore deleted file mode 100644 index 5366292..0000000 --- a/component-kotlin/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -target/ -*.iml -.idea -.classpath -.project -.DS_Store diff --git a/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml b/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml index b1b6f2e..6085a34 100644 --- a/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -18,9 +18,7 @@ --> - - 256 - + diff --git a/pom.xml b/pom.xml index 909de1f..95c74f5 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,7 @@ component-kotlin service service-mvc + service-mvc-kotlin + + + 4.0.0 + + com.opentable + otj-spring-archetypes + 0.0.9-SNAPSHOT + + + spring-archetype-service-mvc-kotlin + maven-archetype + OpenTable Spring MVC Service Kotlin archetype + + + + org.springframework + spring-beans + + + org.springframework + spring-context + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + false + + + + + diff --git a/service-mvc-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml b/service-mvc-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..d489379 --- /dev/null +++ b/service-mvc-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,60 @@ + + + + + + + + + + src/main/java + + **/*.java + **/*.kt + + + + src/main/kotlin + + **/*.java + **/*.kt + + + + src/test/java + + **/*.java + **/*.kt + + + + src/test/kotlin + + **/*.java + **/*.kt + + + + + + .build-service + .gitignore + + + + diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/.build-service b/service-mvc-kotlin/src/main/resources/archetype-resources/.build-service new file mode 100644 index 0000000..e69de29 diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..f20fb9f --- /dev/null +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,275 @@ + +## Licensed 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. + + + + 4.0.0 + + com.opentable + otj-parent-spring + ${otj-parent-version} + + + + scm:git:git://github.com/opentable/${project.artifactId}.git + scm:git:git@github.com:opentable/${project.artifactId}.git + http://github.com/opentable/${project.artifactId} + HEAD + + + ${groupId} + ${artifactId} + 1.0.0-SNAPSHOT + Automatically generated description, fill me in! + + + ${package}.Main + 11 + 1.4.10 + official + true + 13.0 + 1.6.2 + + + + + + org.jetbrains.kotlin + kotlin-stdlib + + + org.jetbrains + annotations + + + + + com.opentable.components + otj-core + + + com.opentable.components + otj-server-core + + + com.opentable.components + otj-server-mvc + + + com.opentable.components + otj-rest-template + + + com.opentable.service.discovery + discovery-client + + + + + org.springframework + spring-context + + + org.springframework + spring-web + + + org.springframework + spring-beans + + + + + junit + junit + test + + + org.springframework + spring-test + test + + + org.springframework.boot + spring-boot-test + test + + + org.assertj + assertj-core + test + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.junit.vintage + junit-vintage-engine + test + + + + + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-stdlib + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-stdlib-common + ${dep.kotlin.version} + + + org.jetbrains + annotations + ${dep.jetbrails.annotations.version} + + + org.jetbrains.kotlin + kotlin-test + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-common + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-annotations-common + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-junit + ${dep.kotlin.version} + + + org.jetbrains.kotlin + kotlin-test-junit5 + ${dep.kotlin.version} + + + org.junit.platform + junit-platform-engine + ${dep.junit-platform.version} + + + org.junit.platform + junit-platform-commons + ${dep.junit-platform.version} + + + + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${dep.kotlin.version} + + + spring + + + + + compile + compile + + compile + + + + src/main/java + src/main/kotlin + + + + + test-compile + test-compile + + test-compile + + + + src/test/java + src/test/kotlin + + + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${dep.kotlin.version} + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${dep.plugin.compiler.version} + + + default-compile + none + + + default-testCompile + none + + + java-compile + compile + + compile + + + + java-testCompile + test-compile + + testCompile + + + + + + + diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/Main.kt b/service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/Main.kt new file mode 100644 index 0000000..9bc43f7 --- /dev/null +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/Main.kt @@ -0,0 +1,44 @@ +## Licensed 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 ${package}; + +import com.opentable.resttemplate.RestTemplateConfiguration +import com.opentable.resttemplate.RestTemplateFactory + +import com.opentable.server.OTApplication +import com.opentable.server.mvc.MVCServer + +import com.opentable.service.ServiceInfo +import com.opentable.service.discovery.client.EnableDiscoveryClient + +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.context.annotation.Import + +import org.springframework.web.client.RestTemplate + +@Configuration +@MVCServer +@EnableDiscoveryClient +@Import(RestTemplateConfiguration::class, MyController::class) +class Main { + @Bean + fun serviceInfo(): ServiceInfo = ServiceInfo { "service-it" } + + @Bean("curlClient") + fun curlClient(restTemplateFactory: RestTemplateFactory): RestTemplate = + restTemplateFactory.newTemplate(true, "curlClient") +} + +fun main(args: Array) { + OTApplication.run(Main::class.java, *args) +} diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/MyController.kt b/service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/MyController.kt new file mode 100644 index 0000000..d725d93 --- /dev/null +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/src/main/kotlin/MyController.kt @@ -0,0 +1,23 @@ +## Licensed 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 ${package}; + +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RequestMapping +import org.springframework.web.bind.annotation.RestController + +@RequestMapping("/") +@RestController +class MyController { + @GetMapping + fun getGreeting(): String = "Hello, world!" +} diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/src/test/kotlin/MainTest.kt b/service-mvc-kotlin/src/main/resources/archetype-resources/src/test/kotlin/MainTest.kt new file mode 100644 index 0000000..1059321 --- /dev/null +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/src/test/kotlin/MainTest.kt @@ -0,0 +1,40 @@ +## Licensed 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 ${package}; + +import org.assertj.core.api.Assertions.assertThat + +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.extension.ExtendWith + +import org.springframework.beans.factory.annotation.Autowired + +import org.springframework.boot.test.context.SpringBootTest +import org.springframework.boot.test.context.SpringBootTest.WebEnvironment + +import org.springframework.boot.test.web.client.TestRestTemplate + +import org.springframework.http.HttpStatus +import org.springframework.http.ResponseEntity + +import org.springframework.test.context.junit.jupiter.SpringExtension + +@ExtendWith(SpringExtension::class) +@SpringBootTest(classes = [Main::class], webEnvironment = WebEnvironment.RANDOM_PORT) +class MainTest(@Autowired val testRestTemplate: TestRestTemplate) { + @Test + fun testHelloWorld() { + val actualResponse: ResponseEntity = testRestTemplate.getForEntity("/", String::class.java) + assertThat(actualResponse.statusCode).isEqualTo(HttpStatus.OK) + assertThat(actualResponse.body).isEqualTo("Hello, world!") + } +} diff --git a/service-mvc-kotlin/src/test/resources/projects/test-service/archetype.properties b/service-mvc-kotlin/src/test/resources/projects/test-service/archetype.properties new file mode 100644 index 0000000..31bb65a --- /dev/null +++ b/service-mvc-kotlin/src/test/resources/projects/test-service/archetype.properties @@ -0,0 +1,19 @@ +# +# Licensed 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. +# + +groupId=com.opentable.its +artifactId=service-it +version=0.1.2-SNAPSHOT +package=com.opentable.its.mvc +otj-parent-version=256 diff --git a/service-mvc-kotlin/src/test/resources/projects/test-service/goal.txt b/service-mvc-kotlin/src/test/resources/projects/test-service/goal.txt new file mode 100644 index 0000000..4a1a71d --- /dev/null +++ b/service-mvc-kotlin/src/test/resources/projects/test-service/goal.txt @@ -0,0 +1 @@ +verify \ No newline at end of file From 17cc2c6b206d1e965d1237b4daa845c332e9ab71 Mon Sep 17 00:00:00 2001 From: gserrano Date: Thu, 15 Oct 2020 16:04:14 -0500 Subject: [PATCH 03/10] [service-mvc-kotlin] archetype for creating spring mvc service in Kotlin. --- .../resources/archetype-resources/.gitignore | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 service-mvc-kotlin/src/main/resources/archetype-resources/.gitignore diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/.gitignore b/service-mvc-kotlin/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000..0da5ef8 --- /dev/null +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1,19 @@ +pkg/ +*.o +*.lo +*.pc +*.log +*.status +.deps/ +*.iml +*.ipr +*.iws +coverage/ +target/ +.rakeTasks +.rvmrc +.idea +.classpath +.project +.settings +/.checkstyle From 107dabe9e7207568671abcdfa711756b1bb0bca9 Mon Sep 17 00:00:00 2001 From: gserrano Date: Thu, 15 Oct 2020 17:02:42 -0500 Subject: [PATCH 04/10] [component-kotlin] fixing & tweaking small things --- component-kotlin/pom.xml | 196 +----------------- .../META-INF/maven/archetype-metadata.xml | 6 + .../resources/archetype-resources/.gitignore | 19 ++ .../kotlin/ComponentKotlinConfiguration.kt | 2 +- 4 files changed, 36 insertions(+), 187 deletions(-) create mode 100644 component-kotlin/src/main/resources/archetype-resources/.gitignore diff --git a/component-kotlin/pom.xml b/component-kotlin/pom.xml index e9a0d33..63b54c4 100644 --- a/component-kotlin/pom.xml +++ b/component-kotlin/pom.xml @@ -25,213 +25,37 @@ maven-archetype OpenTable Spring Component archetype for Kotlin - - - 11 - 1.4.10 - official - true - 1.6.2 - - - - - org.slf4j - slf4j-api - - - org.springframework spring-beans - - - javax.inject - javax.inject - - - org.springframework - spring-context - - - - - org.jetbrains.kotlin - kotlin-stdlib - - - org.jetbrains - annotations - - - org.jetbrains.kotlin - kotlin-test - test - - - - - junit - junit - - - org.junit.jupiter - junit-jupiter-api test - org.junit.jupiter - junit-jupiter-engine - test + org.slf4j + slf4j-api + runtime - org.junit.jupiter - junit-jupiter-params + javax.inject + javax.inject test - org.junit.vintage - junit-vintage-engine + org.springframework + spring-context test - - - - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - ${dep.kotlin.version} - - - org.jetbrains.kotlin - kotlin-stdlib - ${dep.kotlin.version} - - - org.jetbrains.kotlin - kotlin-stdlib-common - ${dep.kotlin.version} - - - org.jetbrains - annotations - 13.0 - - - org.jetbrains.kotlin - kotlin-test - ${dep.kotlin.version} - - - org.jetbrains.kotlin - kotlin-test-common - ${dep.kotlin.version} - - - org.jetbrains.kotlin - kotlin-test-annotations-common - ${dep.kotlin.version} - - - org.jetbrains.kotlin - kotlin-test-junit - ${dep.kotlin.version} - - - org.jetbrains.kotlin - kotlin-test-junit5 - ${dep.kotlin.version} - - - org.junit.platform - junit-platform-engine - ${dep.junit-platform.version} - - - org.junit.platform - junit-platform-commons - ${dep.junit-platform.version} - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${dep.kotlin.version} + org.apache.maven.plugins + maven-resources-plugin - - spring - + false - - - compile - compile - - compile - - - - src/main/java - src/main/kotlin - - - - - test-compile - test-compile - - test-compile - - - - src/test/java - src/test/kotlin - - - - - - - org.jetbrains.kotlin - kotlin-maven-allopen - ${dep.kotlin.version} - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${dep.plugin.compiler.version} - - - default-compile - none - - - default-testCompile - none - - - java-compile - compile - - compile - - - - java-testCompile - test-compile - - testCompile - - - diff --git a/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml b/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml index 6085a34..a915389 100644 --- a/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/component-kotlin/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -49,5 +49,11 @@ **/*.kt + + + + .gitignore + + diff --git a/component-kotlin/src/main/resources/archetype-resources/.gitignore b/component-kotlin/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000..0da5ef8 --- /dev/null +++ b/component-kotlin/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1,19 @@ +pkg/ +*.o +*.lo +*.pc +*.log +*.status +.deps/ +*.iml +*.ipr +*.iws +coverage/ +target/ +.rakeTasks +.rvmrc +.idea +.classpath +.project +.settings +/.checkstyle diff --git a/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt b/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt index 32d5650..a512040 100644 --- a/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt +++ b/component-kotlin/src/main/resources/archetype-resources/src/main/kotlin/ComponentKotlinConfiguration.kt @@ -20,7 +20,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** - * A Spring Configuration class for our ComponentJava. + * A Spring Configuration class for our ComponentKotlin. * Inject configuration values, set up your beans, etc. */ @Configuration From 8bf73bfcdba3e72221863eae0db7527f52261a2f Mon Sep 17 00:00:00 2001 From: gserrano Date: Thu, 15 Oct 2020 17:41:50 -0500 Subject: [PATCH 05/10] [kotlin (all)] added property to `pom.xml` to inform we are using java 11. --- component-kotlin/pom.xml | 4 ++++ service-mvc-kotlin/pom.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/component-kotlin/pom.xml b/component-kotlin/pom.xml index 63b54c4..33dec9f 100644 --- a/component-kotlin/pom.xml +++ b/component-kotlin/pom.xml @@ -25,6 +25,10 @@ maven-archetype OpenTable Spring Component archetype for Kotlin + + 11 + + org.springframework diff --git a/service-mvc-kotlin/pom.xml b/service-mvc-kotlin/pom.xml index 286ee27..03c2ca4 100644 --- a/service-mvc-kotlin/pom.xml +++ b/service-mvc-kotlin/pom.xml @@ -25,6 +25,10 @@ maven-archetype OpenTable Spring MVC Service Kotlin archetype + + 11 + + org.springframework From bc524e60581bdd408def0693332a29be6bf436c1 Mon Sep 17 00:00:00 2001 From: gserrano Date: Fri, 16 Oct 2020 17:26:57 -0500 Subject: [PATCH 06/10] [kotlin (all)] removed all references to Java11 --- component-kotlin/pom.xml | 4 ---- .../src/main/resources/archetype-resources/pom.xml | 1 - service-mvc-kotlin/pom.xml | 4 ---- .../src/main/resources/archetype-resources/pom.xml | 1 - 4 files changed, 10 deletions(-) diff --git a/component-kotlin/pom.xml b/component-kotlin/pom.xml index 33dec9f..63b54c4 100644 --- a/component-kotlin/pom.xml +++ b/component-kotlin/pom.xml @@ -25,10 +25,6 @@ maven-archetype OpenTable Spring Component archetype for Kotlin - - 11 - - org.springframework diff --git a/component-kotlin/src/main/resources/archetype-resources/pom.xml b/component-kotlin/src/main/resources/archetype-resources/pom.xml index c35d6d7..8f2cf58 100644 --- a/component-kotlin/src/main/resources/archetype-resources/pom.xml +++ b/component-kotlin/src/main/resources/archetype-resources/pom.xml @@ -33,7 +33,6 @@ Automatically generated description, fill me in! - 11 1.4.10 official true diff --git a/service-mvc-kotlin/pom.xml b/service-mvc-kotlin/pom.xml index 03c2ca4..286ee27 100644 --- a/service-mvc-kotlin/pom.xml +++ b/service-mvc-kotlin/pom.xml @@ -25,10 +25,6 @@ maven-archetype OpenTable Spring MVC Service Kotlin archetype - - 11 - - org.springframework diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml index f20fb9f..6b4249b 100644 --- a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml @@ -34,7 +34,6 @@ ${package}.Main - 11 1.4.10 official true From d931b92402296d818b9b2da572c664210b4203d3 Mon Sep 17 00:00:00 2001 From: gserrano Date: Fri, 16 Oct 2020 18:00:39 -0500 Subject: [PATCH 07/10] [service-mvc-kotlin] Fixing main class name to make executable jar. --- .../src/main/resources/archetype-resources/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml index 6b4249b..5a5e0d5 100644 --- a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml @@ -33,7 +33,7 @@ Automatically generated description, fill me in! - ${package}.Main + ${package}.MainKt 1.4.10 official true From bc65a509d953d95378b441daa331529ea84d5127 Mon Sep 17 00:00:00 2001 From: gserrano Date: Fri, 7 May 2021 16:58:33 -0500 Subject: [PATCH 08/10] fixed pom --- .../src/main/resources/archetype-resources/pom.xml | 5 ++--- .../src/main/resources/archetype-resources/pom.xml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/component-kotlin/src/main/resources/archetype-resources/pom.xml b/component-kotlin/src/main/resources/archetype-resources/pom.xml index 8f2cf58..7bfeefa 100644 --- a/component-kotlin/src/main/resources/archetype-resources/pom.xml +++ b/component-kotlin/src/main/resources/archetype-resources/pom.xml @@ -36,8 +36,7 @@ 1.4.10 official true - 13.0 - 1.6.2 + 13.0 @@ -142,7 +141,7 @@ org.jetbrains annotations - ${dep.jetbrails.annotations.version} + ${dep.jetbrains.annotations.version} org.jetbrains.kotlin diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml index 5a5e0d5..5f93787 100644 --- a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml @@ -37,8 +37,7 @@ 1.4.10 official true - 13.0 - 1.6.2 + 13.0 @@ -153,7 +152,7 @@ org.jetbrains annotations - ${dep.jetbrails.annotations.version} + ${dep.jetbrains.annotations.version} org.jetbrains.kotlin From cf20860b6648595e4e5699bfb2cd586e630e131b Mon Sep 17 00:00:00 2001 From: gserrano Date: Tue, 19 Oct 2021 20:18:18 -0500 Subject: [PATCH 09/10] removed some junit dependencies, updated parent pom version --- .../src/main/resources/archetype-resources/pom.xml | 10 ---------- .../projects/test-component/archetype.properties | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/component-kotlin/src/main/resources/archetype-resources/pom.xml b/component-kotlin/src/main/resources/archetype-resources/pom.xml index 7bfeefa..dbf946e 100644 --- a/component-kotlin/src/main/resources/archetype-resources/pom.xml +++ b/component-kotlin/src/main/resources/archetype-resources/pom.xml @@ -168,16 +168,6 @@ kotlin-test-junit5 ${dep.kotlin.version} - - org.junit.platform - junit-platform-engine - ${dep.junit-platform.version} - - - org.junit.platform - junit-platform-commons - ${dep.junit-platform.version} - diff --git a/component-kotlin/src/test/resources/projects/test-component/archetype.properties b/component-kotlin/src/test/resources/projects/test-component/archetype.properties index 85db15a..d763b96 100644 --- a/component-kotlin/src/test/resources/projects/test-component/archetype.properties +++ b/component-kotlin/src/test/resources/projects/test-component/archetype.properties @@ -16,7 +16,7 @@ groupId=com.opentable.it artifactId=component-it version=0.1.2-SNAPSHOT package=com.opentable.it -otj-parent-version=256 +otj-parent-version=278 archetype.filteredExtensions=java,kt,kotlin archetype.languages=groovy,kotlin,kt From eab964c0e81202e89beb7d3f3be97f274cab9135 Mon Sep 17 00:00:00 2001 From: gserrano Date: Wed, 20 Oct 2021 22:15:36 -0500 Subject: [PATCH 10/10] [service-mvc-kotlin] Updated libraries & pom --- .../src/main/resources/archetype-resources/pom.xml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml index 5f93787..c89ea19 100644 --- a/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml +++ b/service-mvc-kotlin/src/main/resources/archetype-resources/pom.xml @@ -34,7 +34,7 @@ ${package}.MainKt - 1.4.10 + 1.5.31 official true 13.0 @@ -179,16 +179,6 @@ kotlin-test-junit5 ${dep.kotlin.version} - - org.junit.platform - junit-platform-engine - ${dep.junit-platform.version} - - - org.junit.platform - junit-platform-commons - ${dep.junit-platform.version} -