为什么Thorntail不能从Gradle文件中提取配置?

时间:2019-12-04 07:13:30

标签: gradle thorntail

我有以下builds.gradle文件,该文件基于Thorntail示例。不幸的是thorntail块似乎被完全忽略了。当我运行应用程序Thorntail时,它将在默认端口8080上运行。

buildscript {
    String thorntailVersion = System.getProperty('thorntailVersion') ?: VERSION_THORNTAIL

    repositories {
        mavenLocal()
        mavenCentral()
    }

    dependencies {
        classpath "io.thorntail:thorntail-gradle-plugin:$thorntailVersion"
    }
}

plugins {
    id 'java'
    id 'idea'
    id 'war'
}

apply plugin: 'thorntail'

thorntail {
    properties {
        http.host = 'localhost'
        swarm.http.port = 8181
    }
}

group 'ch.robin.auth'
version '0.0.1'

sourceCompatibility = 1.8

repositories {
    mavenLocal()
    mavenCentral()
    maven {
        name 'Gradle Tooling'
        url 'https://repo.gradle.org/gradle/libs-releases/'
    }
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots/"
    }
    maven {
        url "http://repository.jboss.org/nexus/content/groups/public/"
    }
}
String thorntailVersion = System.getProperty('thorntailVersion') ?: VERSION_THORNTAIL

dependencies {
    implementation enforcedPlatform("io.thorntail:bom-all:$thorntailVersion")
    implementation 'javax:javaee-api:8.0.1'
    implementation "com.h2database:h2:1.4.187"
    implementation 'io.thorntail:jpa:2.5.0.Final'
    implementation 'io.thorntail:jaxrs:2.5.0.Final'
    implementation 'io.thorntail:cdi:2.5.0.Final'
    implementation "commons-io:commons-io:2.4"
    implementation "com.h2database:h2:1.4.200"

    testCompile group: 'junit', name: 'junit', version: '4.12'
}

如何通过builds.gradle配置Thorntail?

这是一个最小的项目:https://github.com/openscript/thorntail-gradle-settingsfile/

0 个答案:

没有答案