elasticsearch/qa/wildfly/build.gradle

73 lines
2.8 KiB
Groovy

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import org.elasticsearch.gradle.Architecture
import org.elasticsearch.gradle.VersionProperties
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER;
apply plugin: 'war'
apply plugin: 'elasticsearch.java'
apply plugin: 'elasticsearch.test.fixtures'
apply plugin: 'elasticsearch.internal-distribution-download'
dependencies {
providedCompile 'javax.enterprise:cdi-api:1.2'
providedCompile 'org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.0.Final'
providedCompile 'org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:1.0.0.Final'
api('org.jboss.resteasy:resteasy-jackson2-provider:3.0.19.Final') {
exclude module: 'jackson-annotations'
exclude module: 'jackson-core'
exclude module: 'jackson-databind'
exclude module: 'jackson-jaxrs-json-provider'
}
api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
api "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:${versions.jackson}"
api "com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:${versions.jackson}"
api "com.fasterxml.jackson.module:jackson-module-jaxb-annotations:${versions.jackson}"
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
api "org.apache.logging.log4j:log4j-core:${versions.log4j}"
api project(path: ':client:rest-high-level', configuration: 'shadow')
testImplementation project(':test:framework')
}
tasks.named("war").configure {
archiveFileName = 'example-app.war'
}
// The wildfly docker image is only available for x86 architectures so disable these tests on arm
if (Architecture.current() == Architecture.X64) {
testFixtures.useFixture()
}
elasticsearch_distributions {
docker {
type = DOCKER
architecture = Architecture.current()
version = VersionProperties.getElasticsearch()
failIfUnavailable = false // This ensures we skip this testing if Docker is unavailable
}
}
tasks.named("preProcessFixture").configure {
dependsOn "war", elasticsearch_distributions.docker
}
tasks.register("integTest", Test) {
outputs.doNotCacheIf('Build cache is disabled for Docker tests') { true }
onlyIf { Architecture.current() == Architecture.X64 }
maxParallelForks = '1'
include '**/*IT.class'
systemProperty 'tests.security.manager', 'false'
}
tasks.named("check").configure {
dependsOn "integTest"
}