/* * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. * * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. */ /* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you 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. */ import org.opensearch.gradle.Architecture import org.opensearch.gradle.VersionProperties import org.opensearch.gradle.test.TestTask apply plugin: 'war' apply plugin: 'opensearch.build' apply plugin: 'opensearch.test.fixtures' apply plugin: 'opensearch.internal-distribution-download' testFixtures.useFixture() dependencies { providedCompile('jakarta.enterprise:jakarta.enterprise.cdi-api:4.0.1') { exclude module: 'jakarta.annotation-api' } providedCompile 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0' providedCompile "org.jboss.resteasy:resteasy-core:${versions.resteasy}" providedCompile "org.jboss.resteasy:resteasy-core-spi:${versions.resteasy}" api("org.jboss.resteasy:resteasy-jackson2-provider:${versions.resteasy}") { exclude module: 'jakarta.activation-api' exclude group: 'com.fasterxml.jackson' exclude group: 'com.fasterxml.jackson.core' exclude group: 'com.fasterxml.jackson.dataformat' exclude group: 'com.fasterxml.jackson.module' } api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" api "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-base:${versions.jackson}" api "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:${versions.jackson}" api "com.github.fge:json-patch:1.9" api(project(path: ':client:rest-high-level')) { exclude module: 'jakarta.annotation-api' } testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" testImplementation(project(':test:framework')) { exclude module: 'jakarta.annotation-api' } } war { archiveFileName = 'example-app.war' } opensearch_distributions { docker { type = 'docker' architecture = Architecture.current() version = VersionProperties.getOpenSearch() failIfUnavailable = false // This ensures we skip this testing if Docker is unavailable } } preProcessFixture { dependsOn war, opensearch_distributions.docker } dockerCompose { useComposeFiles = ['docker-compose.yml'] } tasks.register("integTest", TestTask) { outputs.doNotCacheIf('Build cache is disabled for Docker tests') { true } maxParallelForks = '1' include '**/*IT.class' } check.dependsOn integTest test.enabled = false tasks.named("dependencyLicenses").configure { it.enabled = false } dependenciesInfo.enabled = false thirdPartyAudit.enabled = false testingConventions { naming.clear() // We only have one "special" integration test here to connect to wildfly naming { IT { baseClass 'org.apache.lucene.tests.util.LuceneTestCase' } } }