我有以下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/