Skip to content

Commit

Permalink
Fix kotlin-wildfly-swarm
Browse files Browse the repository at this point in the history
  • Loading branch information
daggerok committed Oct 27, 2018
1 parent 4d8a311 commit b527210
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 49 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ script:
# generator-jvm cli
- yo jvm --help

# kotlin-wildfly-swarm
- cd ${e2e}
- yo jvm -n kotlin-wildfly-swarm -t kotlin-wildfly-swarm
- cd ${e2e}/kotlin-wildfly-swarm/
#
- bash mvnw >/dev/null
- bash target/*-swarm.jar &
- wait_for 8080
- sleep 3s
- http :8080
- stop_any 80 8080
#
- bash gradlew >/dev/null
- bash build/libs/*-swarm.jar &
- wait_for 8080
- sleep 3s
- http :8080

# java-ee-cdi-full-multi-project
- cd ${e2e}
- yo jvm -n java-ee-cdi-full-multi-project -t java-ee-cdi-full-multi-project
Expand Down
12 changes: 12 additions & 0 deletions generators/app/templates/kotlin-wildfly-swarm/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,19 @@ script:
- export root=$(pwd)
#
- bash mvnw >/dev/null
- bash target/*-swarm.jar &
- wait_for 8080
- sleep 3s
- http :8080
- stop_any 80 8080
#
- bash gradlew >/dev/null
- bash build/libs/*-swarm.jar &
- wait_for 8080
- sleep 3s
- http :8080
- stop_any 80 8080
#

before_deploy:
- cd ${root}
Expand Down
22 changes: 10 additions & 12 deletions generators/app/templates/kotlin-wildfly-swarm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ plugins {
id 'eclipse'

id 'org.jetbrains.kotlin.jvm' version '1.2.71' apply false
id 'org.jetbrains.kotlin.kapt' version '1.2.71' apply false
//id 'org.jetbrains.kotlin.kapt' version '1.2.71' apply false
id 'org.jetbrains.kotlin.plugin.noarg' version '1.2.71' apply false
id 'org.jetbrains.kotlin.plugin.spring' version '1.2.71' apply false
id 'org.jetbrains.kotlin.plugin.allopen' version '1.2.71' apply false
Expand All @@ -55,12 +55,10 @@ plugins {

apply plugin: 'wildfly-swarm'

/*
wrapper {
gradleVersion = '4.10.2'
distributionType = 'BIN'
}
*/

apply from: "$projectDir/gradle/ide.gradle"
apply from: "$projectDir/gradle/clean.gradle"
Expand All @@ -74,7 +72,7 @@ apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.plugin.jpa'
apply plugin: 'org.jetbrains.kotlin.plugin.noarg'
apply plugin: 'org.jetbrains.kotlin.plugin.allopen'
//apply plugin: 'org.jetbrains.kotlin.plugin.spring'
apply plugin: 'org.jetbrains.kotlin.plugin.spring'

compileKotlin {
incremental = true
Expand Down Expand Up @@ -129,31 +127,31 @@ compileJava.dependsOn(processResources)
lombok.version = project.lombokVersion

dependencies {

//implementation "org.webjars:materializecss:$materializecssVersion"
//implementation "org.webjars:material-design-icons:$materialDesignIconsVersion"

implementation 'org.wildfly.swarm:microprofile'
implementation 'org.wildfly.swarm:logging'
implementation 'org.wildfly.swarm:ejb'
implementation 'org.wildfly.swarm:cdi'
implementation 'org.wildfly.swarm:jaxrs-jsonp'

implementation 'org.wildfly.swarm:jpa'
implementation 'org.wildfly.swarm:flyway'
implementation 'org.wildfly.swarm:jaxrs-jsonp'
testImplementation 'org.wildfly.swarm:arquillian'
implementation 'com.h2database:h2:1.4.196'

providedCompile "javax:javaee-api:$javaeeVersion"

implementation('com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6')
//implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonKotlinVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonKotlinVersion")
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

providedCompile "javax:javaee-api:$javaeeVersion"
providedCompile 'com.h2database:h2:1.4.196'
implementation "io.vavr:vavr:$vavrVersion"

implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation 'ch.qos.logback:logback-classic:1.2.3'

implementation "io.vavr:vavr:$vavrVersion"

testImplementation 'junit:junit:4.12'
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation 'org.hamcrest:hamcrest-core:1.3'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repositories {
maven { url 'https://repository.jboss.org/nexus/content/groups/public-jboss/' }
//mavenLocal() // for some reasons code source not attaching with this mavenLocal repository enabled in idea...
mavenCentral()
jcenter()
//maven { url 'https://repo.spring.io/libs-milestone' }
}
88 changes: 53 additions & 35 deletions generators/app/templates/kotlin-wildfly-swarm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<jgiven.version>0.16.1</jgiven.version>
<junit4.version>4.12</junit4.version>
<slf4j.version>1.7.22</slf4j.version>
<javaee.version>8.0</javaee.version>
<javaee.version>7.0</javaee.version>
<vavr.version>0.9.2</vavr.version>
<h2.version>1.4.196</h2.version>
</properties>
Expand Down Expand Up @@ -61,12 +61,43 @@
</dependencyManagement>

<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<repository>
<id>jcenter.bintray.com</id>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>

<dependencies>
<!--
<dependency>
Expand All @@ -82,10 +113,6 @@
-->

<!-- wildfly swarm -->
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>microprofile</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>logging</artifactId>
Expand All @@ -102,7 +129,8 @@
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs-jsonp</artifactId>
</dependency>
<dependency><!-- include datasources (which is include logging) -->

<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jpa</artifactId>
</dependency>
Expand All @@ -111,9 +139,18 @@
<artifactId>flyway</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>arquillian</artifactId>
<scope>test</scope>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<type>jar</type>
</dependency>

<!-- JavaEE-->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${javaee.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand All @@ -123,6 +160,11 @@
</dependency>

<!-- Kotlin -->
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
<version>2.9.7</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
Expand All @@ -135,23 +177,6 @@
<scope>test</scope>
</dependency>

<!-- JavaEE-->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${javaee.version}</version>
<scope>provided</scope>
</dependency>

<!-- H2 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>

<!-- Tools -->
<dependency>
<groupId>io.vavr</groupId>
Expand Down Expand Up @@ -315,7 +340,7 @@
</configuration>

<executions>
<execution>
<!--<execution>
<id>kapt</id>
<goals>
<goal>kapt</goal>
Expand All @@ -326,16 +351,9 @@
<sourceDir>src/main/java</sourceDir>
</sourceDirs>
<annotationProcessorPaths>
<!-- Specify your annotation processors here.
<annotationProcessorPath>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.9</version>
</annotationProcessorPath>
-->
</annotationProcessorPaths>
</configuration>
</execution>
</execution>-->

<execution>
<id>compile</id>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-jvm",
"version": "1.18.66",
"version": "1.18.67",
"description": "Helps you quick and easy generate JVM-based (java, java ee, kotlin, scala) projects with gradle and maven build systems, docker and docker-compose for rapid development",
"homepage": "https://github.com/daggerok/generator-jvm",
"author": {
Expand Down

0 comments on commit b527210

Please sign in to comment.