2021-04-09 15:28:18 -04:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
2016-04-29 09:54:15 -04:00
|
|
|
|
2015-10-29 14:40:19 -04:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
2021-04-09 15:28:18 -04:00
|
|
|
|
|
|
|
import org.opensearch.gradle.LoggedExec
|
|
|
|
import org.opensearch.gradle.info.BuildParams
|
|
|
|
|
2021-03-11 00:06:21 -05:00
|
|
|
apply plugin: 'opensearch.yaml-rest-test'
|
|
|
|
apply plugin: 'opensearch.internal-cluster-test'
|
2015-10-29 14:40:19 -04:00
|
|
|
|
2021-03-11 00:06:21 -05:00
|
|
|
opensearchplugin {
|
2016-06-30 09:16:51 -04:00
|
|
|
description 'The Azure Classic Discovery plugin allows to use Azure Classic API for the unicast discovery mechanism'
|
2021-03-11 00:06:21 -05:00
|
|
|
classname 'org.opensearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin'
|
2015-10-29 14:40:19 -04:00
|
|
|
}
|
|
|
|
|
2015-11-10 17:58:46 -05:00
|
|
|
versions << [
|
2016-03-15 04:18:34 -04:00
|
|
|
'azure': '0.9.3',
|
2015-11-10 17:58:46 -05:00
|
|
|
'jersey': '1.13'
|
|
|
|
]
|
|
|
|
|
2015-10-29 14:40:19 -04:00
|
|
|
dependencies {
|
2020-06-30 09:57:41 -04:00
|
|
|
api "com.microsoft.azure:azure-svc-mgmt-compute:${versions.azure}"
|
|
|
|
api "com.microsoft.azure:azure-core:${versions.azure}"
|
|
|
|
api "org.apache.httpcomponents:httpclient:${versions.httpclient}"
|
|
|
|
api "org.apache.httpcomponents:httpcore:${versions.httpcore}"
|
|
|
|
api "commons-logging:commons-logging:${versions.commonslogging}"
|
|
|
|
api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
|
|
|
|
api "commons-codec:commons-codec:${versions.commonscodec}"
|
|
|
|
api "commons-lang:commons-lang:2.6"
|
2021-05-25 17:57:36 -04:00
|
|
|
api "commons-io:commons-io:2.7"
|
2020-06-30 09:57:41 -04:00
|
|
|
api 'javax.mail:mail:1.4.5'
|
|
|
|
api 'javax.inject:javax.inject:1'
|
|
|
|
api "com.sun.jersey:jersey-client:${versions.jersey}"
|
|
|
|
api "com.sun.jersey:jersey-core:${versions.jersey}"
|
|
|
|
api "com.sun.jersey:jersey-json:${versions.jersey}"
|
|
|
|
api 'org.codehaus.jettison:jettison:1.1'
|
|
|
|
api 'com.sun.xml.bind:jaxb-impl:2.2.3-1'
|
2016-05-20 02:56:06 -04:00
|
|
|
|
|
|
|
// HACK: javax.xml.bind was removed from default modules in java 9, so we pull the api in here,
|
2020-03-23 18:30:10 -04:00
|
|
|
// and whitelist this hack in JarHell
|
2020-06-30 09:57:41 -04:00
|
|
|
api 'javax.xml.bind:jaxb-api:2.2.2'
|
2015-10-29 14:40:19 -04:00
|
|
|
}
|
|
|
|
|
2020-03-19 13:28:59 -04:00
|
|
|
restResources {
|
|
|
|
restApi {
|
|
|
|
includeCore '_common', 'cluster', 'nodes'
|
|
|
|
}
|
|
|
|
}
|
2020-07-29 12:20:19 -04:00
|
|
|
|
2016-04-29 09:54:15 -04:00
|
|
|
// needed to be consistent with ssl host checking
|
2019-05-24 21:08:51 -04:00
|
|
|
String host = InetAddress.getLoopbackAddress().getHostAddress()
|
2016-04-29 09:54:15 -04:00
|
|
|
|
|
|
|
// location of keystore and files to generate it
|
|
|
|
File keystore = new File(project.buildDir, 'keystore/test-node.jks')
|
|
|
|
|
|
|
|
// generate the keystore
|
2020-07-31 07:09:04 -04:00
|
|
|
TaskProvider createKey = tasks.register("createKey", LoggedExec) {
|
2016-04-29 09:54:15 -04:00
|
|
|
doFirst {
|
2020-10-05 09:52:15 -04:00
|
|
|
delete(keystore.parentFile)
|
2016-04-29 09:54:15 -04:00
|
|
|
keystore.parentFile.mkdirs()
|
|
|
|
}
|
2019-05-24 21:08:51 -04:00
|
|
|
outputs.file(keystore).withPropertyName('keystoreFile')
|
2019-11-01 14:33:11 -04:00
|
|
|
executable = "${BuildParams.runtimeJavaHome}/bin/keytool"
|
2016-04-29 09:54:15 -04:00
|
|
|
standardInput = new ByteArrayInputStream('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n'.getBytes('UTF-8'))
|
|
|
|
args '-genkey',
|
2019-11-14 06:01:23 -05:00
|
|
|
'-alias', 'test-node',
|
|
|
|
'-keystore', keystore,
|
|
|
|
'-keyalg', 'RSA',
|
|
|
|
'-keysize', '2048',
|
|
|
|
'-validity', '712',
|
|
|
|
'-dname', 'CN=' + host,
|
|
|
|
'-keypass', 'keypass',
|
|
|
|
'-storepass', 'keypass'
|
2016-04-29 09:54:15 -04:00
|
|
|
}
|
2020-07-29 12:20:19 -04:00
|
|
|
//no unit tests
|
2020-07-31 07:09:04 -04:00
|
|
|
tasks.named("test").configure { enabled = false }
|
2016-04-29 09:54:15 -04:00
|
|
|
// add keystore to test classpath: it expects it there
|
2020-07-31 07:09:04 -04:00
|
|
|
tasks.named("processInternalClusterTestResources").configure {
|
2019-05-24 21:08:51 -04:00
|
|
|
from createKey
|
|
|
|
}
|
|
|
|
|
|
|
|
normalization {
|
|
|
|
runtimeClasspath {
|
|
|
|
ignore 'test-node.jks'
|
|
|
|
}
|
|
|
|
}
|
2016-04-29 09:54:15 -04:00
|
|
|
|
2020-06-18 02:15:50 -04:00
|
|
|
tasks.named("dependencyLicenses").configure {
|
2015-10-29 14:40:19 -04:00
|
|
|
mapping from: /azure-.*/, to: 'azure'
|
|
|
|
mapping from: /jackson-.*/, to: 'jackson'
|
|
|
|
mapping from: /jersey-.*/, to: 'jersey'
|
|
|
|
mapping from: /jaxb-.*/, to: 'jaxb'
|
|
|
|
}
|
|
|
|
|
2020-07-31 07:09:04 -04:00
|
|
|
|
|
|
|
tasks.named("thirdPartyAudit").configure {
|
2021-05-25 17:57:36 -04:00
|
|
|
|
2020-07-31 07:09:04 -04:00
|
|
|
ignoreMissingClasses(
|
2021-12-10 16:03:41 -05:00
|
|
|
'javax.jms.Message',
|
2019-11-14 06:01:23 -05:00
|
|
|
'javax.servlet.ServletContextEvent',
|
|
|
|
'javax.servlet.ServletContextListener',
|
|
|
|
'org.apache.avalon.framework.logger.Logger',
|
|
|
|
'org.apache.log.Hierarchy',
|
|
|
|
'org.apache.log.Logger',
|
|
|
|
'org.eclipse.persistence.descriptors.ClassDescriptor',
|
|
|
|
'org.eclipse.persistence.internal.oxm.MappingNodeValue',
|
|
|
|
'org.eclipse.persistence.internal.oxm.TreeObjectBuilder',
|
|
|
|
'org.eclipse.persistence.internal.oxm.XPathFragment',
|
|
|
|
'org.eclipse.persistence.internal.oxm.XPathNode',
|
|
|
|
'org.eclipse.persistence.internal.queries.ContainerPolicy',
|
|
|
|
'org.eclipse.persistence.jaxb.JAXBContext',
|
|
|
|
'org.eclipse.persistence.jaxb.JAXBHelper',
|
|
|
|
'org.eclipse.persistence.mappings.DatabaseMapping',
|
|
|
|
'org.eclipse.persistence.mappings.converters.TypeConversionConverter',
|
|
|
|
'org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping',
|
|
|
|
'org.eclipse.persistence.oxm.XMLContext',
|
|
|
|
'org.eclipse.persistence.oxm.XMLDescriptor',
|
|
|
|
'org.eclipse.persistence.oxm.XMLField',
|
|
|
|
'org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping',
|
|
|
|
'org.eclipse.persistence.sessions.DatabaseSession',
|
|
|
|
'org.jvnet.fastinfoset.VocabularyApplicationData',
|
|
|
|
'org.jvnet.staxex.Base64Data',
|
|
|
|
'org.jvnet.staxex.XMLStreamReaderEx',
|
|
|
|
'org.jvnet.staxex.XMLStreamWriterEx',
|
|
|
|
'org.osgi.framework.Bundle',
|
|
|
|
'org.osgi.framework.BundleActivator',
|
|
|
|
'org.osgi.framework.BundleContext',
|
|
|
|
'org.osgi.framework.BundleEvent',
|
2015-12-28 22:38:55 -05:00
|
|
|
'org.osgi.framework.SynchronousBundleListener',
|
2019-11-14 06:01:23 -05:00
|
|
|
'com.sun.xml.fastinfoset.stax.StAXDocumentParser',
|
2021-05-25 17:57:36 -04:00
|
|
|
'com.sun.xml.fastinfoset.stax.StAXDocumentSerializer',
|
|
|
|
'org.codehaus.jackson.Base64Variant',
|
|
|
|
'org.codehaus.jackson.JsonEncoding',
|
|
|
|
'org.codehaus.jackson.JsonFactory',
|
|
|
|
'org.codehaus.jackson.JsonGenerator',
|
|
|
|
'org.codehaus.jackson.JsonGenerator$Feature',
|
|
|
|
'org.codehaus.jackson.JsonLocation',
|
|
|
|
'org.codehaus.jackson.JsonNode',
|
|
|
|
'org.codehaus.jackson.JsonParser',
|
|
|
|
'org.codehaus.jackson.JsonParser$Feature',
|
|
|
|
'org.codehaus.jackson.JsonParser$NumberType',
|
|
|
|
'org.codehaus.jackson.JsonStreamContext',
|
|
|
|
'org.codehaus.jackson.JsonToken',
|
|
|
|
'org.codehaus.jackson.ObjectCodec',
|
|
|
|
'org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider',
|
|
|
|
'org.codehaus.jackson.jaxrs.JacksonJsonProvider',
|
|
|
|
'org.codehaus.jackson.map.JsonSerializableWithType',
|
|
|
|
'org.codehaus.jackson.map.JsonSerializer',
|
|
|
|
'org.codehaus.jackson.map.ObjectMapper',
|
|
|
|
'org.codehaus.jackson.map.SerializerProvider',
|
|
|
|
'org.codehaus.jackson.map.TypeSerializer',
|
|
|
|
'org.codehaus.jackson.type.TypeReference'
|
2019-01-07 10:24:19 -05:00
|
|
|
)
|
2017-07-27 10:14:04 -04:00
|
|
|
|
|
|
|
// jarhell with jdk (intentionally, because jaxb was removed from default modules in java 9)
|
2020-03-23 18:30:10 -04:00
|
|
|
if (BuildParams.runtimeJavaVersion <= JavaVersion.VERSION_1_8) {
|
2020-07-31 07:09:04 -04:00
|
|
|
ignoreJarHellWithJDK(
|
2020-03-23 18:30:10 -04:00
|
|
|
'javax.xml.bind.Binder',
|
|
|
|
'javax.xml.bind.ContextFinder$1',
|
|
|
|
'javax.xml.bind.ContextFinder',
|
|
|
|
'javax.xml.bind.DataBindingException',
|
|
|
|
'javax.xml.bind.DatatypeConverter',
|
|
|
|
'javax.xml.bind.DatatypeConverterImpl$CalendarFormatter',
|
|
|
|
'javax.xml.bind.DatatypeConverterImpl',
|
|
|
|
'javax.xml.bind.DatatypeConverterInterface',
|
|
|
|
'javax.xml.bind.Element',
|
|
|
|
'javax.xml.bind.GetPropertyAction',
|
|
|
|
'javax.xml.bind.JAXB$Cache',
|
|
|
|
'javax.xml.bind.JAXB',
|
|
|
|
'javax.xml.bind.JAXBContext',
|
|
|
|
'javax.xml.bind.JAXBElement$GlobalScope',
|
|
|
|
'javax.xml.bind.JAXBElement',
|
|
|
|
'javax.xml.bind.JAXBException',
|
|
|
|
'javax.xml.bind.JAXBIntrospector',
|
|
|
|
'javax.xml.bind.JAXBPermission',
|
|
|
|
'javax.xml.bind.MarshalException',
|
|
|
|
'javax.xml.bind.Marshaller$Listener',
|
|
|
|
'javax.xml.bind.Marshaller',
|
|
|
|
'javax.xml.bind.Messages',
|
|
|
|
'javax.xml.bind.NotIdentifiableEvent',
|
|
|
|
'javax.xml.bind.ParseConversionEvent',
|
|
|
|
'javax.xml.bind.PrintConversionEvent',
|
|
|
|
'javax.xml.bind.PropertyException',
|
|
|
|
'javax.xml.bind.SchemaOutputResolver',
|
|
|
|
'javax.xml.bind.TypeConstraintException',
|
|
|
|
'javax.xml.bind.UnmarshalException',
|
|
|
|
'javax.xml.bind.Unmarshaller$Listener',
|
|
|
|
'javax.xml.bind.Unmarshaller',
|
|
|
|
'javax.xml.bind.UnmarshallerHandler',
|
|
|
|
'javax.xml.bind.ValidationEvent',
|
|
|
|
'javax.xml.bind.ValidationEventHandler',
|
|
|
|
'javax.xml.bind.ValidationEventLocator',
|
|
|
|
'javax.xml.bind.ValidationException',
|
|
|
|
'javax.xml.bind.Validator',
|
|
|
|
'javax.xml.bind.WhiteSpaceProcessor',
|
|
|
|
'javax.xml.bind.annotation.DomHandler',
|
|
|
|
'javax.xml.bind.annotation.W3CDomHandler',
|
|
|
|
'javax.xml.bind.annotation.XmlAccessOrder',
|
|
|
|
'javax.xml.bind.annotation.XmlAccessType',
|
|
|
|
'javax.xml.bind.annotation.XmlAccessorOrder',
|
|
|
|
'javax.xml.bind.annotation.XmlAccessorType',
|
|
|
|
'javax.xml.bind.annotation.XmlAnyAttribute',
|
|
|
|
'javax.xml.bind.annotation.XmlAnyElement',
|
|
|
|
'javax.xml.bind.annotation.XmlAttachmentRef',
|
|
|
|
'javax.xml.bind.annotation.XmlAttribute',
|
|
|
|
'javax.xml.bind.annotation.XmlElement$DEFAULT',
|
|
|
|
'javax.xml.bind.annotation.XmlElement',
|
|
|
|
'javax.xml.bind.annotation.XmlElementDecl$GLOBAL',
|
|
|
|
'javax.xml.bind.annotation.XmlElementDecl',
|
|
|
|
'javax.xml.bind.annotation.XmlElementRef$DEFAULT',
|
|
|
|
'javax.xml.bind.annotation.XmlElementRef',
|
|
|
|
'javax.xml.bind.annotation.XmlElementRefs',
|
|
|
|
'javax.xml.bind.annotation.XmlElementWrapper',
|
|
|
|
'javax.xml.bind.annotation.XmlElements',
|
|
|
|
'javax.xml.bind.annotation.XmlEnum',
|
|
|
|
'javax.xml.bind.annotation.XmlEnumValue',
|
|
|
|
'javax.xml.bind.annotation.XmlID',
|
|
|
|
'javax.xml.bind.annotation.XmlIDREF',
|
|
|
|
'javax.xml.bind.annotation.XmlInlineBinaryData',
|
|
|
|
'javax.xml.bind.annotation.XmlList',
|
|
|
|
'javax.xml.bind.annotation.XmlMimeType',
|
|
|
|
'javax.xml.bind.annotation.XmlMixed',
|
|
|
|
'javax.xml.bind.annotation.XmlNs',
|
|
|
|
'javax.xml.bind.annotation.XmlNsForm',
|
|
|
|
'javax.xml.bind.annotation.XmlRegistry',
|
|
|
|
'javax.xml.bind.annotation.XmlRootElement',
|
|
|
|
'javax.xml.bind.annotation.XmlSchema',
|
|
|
|
'javax.xml.bind.annotation.XmlSchemaType$DEFAULT',
|
|
|
|
'javax.xml.bind.annotation.XmlSchemaType',
|
|
|
|
'javax.xml.bind.annotation.XmlSchemaTypes',
|
|
|
|
'javax.xml.bind.annotation.XmlSeeAlso',
|
|
|
|
'javax.xml.bind.annotation.XmlTransient',
|
|
|
|
'javax.xml.bind.annotation.XmlType$DEFAULT',
|
|
|
|
'javax.xml.bind.annotation.XmlType',
|
|
|
|
'javax.xml.bind.annotation.XmlValue',
|
|
|
|
'javax.xml.bind.annotation.adapters.CollapsedStringAdapter',
|
|
|
|
'javax.xml.bind.annotation.adapters.HexBinaryAdapter',
|
|
|
|
'javax.xml.bind.annotation.adapters.NormalizedStringAdapter',
|
|
|
|
'javax.xml.bind.annotation.adapters.XmlAdapter',
|
|
|
|
'javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter$DEFAULT',
|
|
|
|
'javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter',
|
|
|
|
'javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters',
|
|
|
|
'javax.xml.bind.attachment.AttachmentMarshaller',
|
|
|
|
'javax.xml.bind.attachment.AttachmentUnmarshaller',
|
|
|
|
'javax.xml.bind.helpers.AbstractMarshallerImpl',
|
|
|
|
'javax.xml.bind.helpers.AbstractUnmarshallerImpl',
|
|
|
|
'javax.xml.bind.helpers.DefaultValidationEventHandler',
|
|
|
|
'javax.xml.bind.helpers.Messages',
|
|
|
|
'javax.xml.bind.helpers.NotIdentifiableEventImpl',
|
|
|
|
'javax.xml.bind.helpers.ParseConversionEventImpl',
|
|
|
|
'javax.xml.bind.helpers.PrintConversionEventImpl',
|
|
|
|
'javax.xml.bind.helpers.ValidationEventImpl',
|
|
|
|
'javax.xml.bind.helpers.ValidationEventLocatorImpl',
|
|
|
|
'javax.xml.bind.util.JAXBResult',
|
|
|
|
'javax.xml.bind.util.JAXBSource$1',
|
|
|
|
'javax.xml.bind.util.JAXBSource',
|
|
|
|
'javax.xml.bind.util.Messages',
|
|
|
|
'javax.xml.bind.util.ValidationEventCollector'
|
|
|
|
)
|
|
|
|
} else {
|
2020-07-31 07:09:04 -04:00
|
|
|
ignoreMissingClasses(
|
|
|
|
'javax.activation.ActivationDataFlavor',
|
|
|
|
'javax.activation.DataContentHandler',
|
|
|
|
'javax.activation.DataHandler',
|
|
|
|
'javax.activation.DataSource',
|
|
|
|
'javax.activation.FileDataSource',
|
|
|
|
'javax.activation.FileTypeMap',
|
|
|
|
'javax.activation.MimeType',
|
|
|
|
'javax.activation.MimeTypeParseException',
|
|
|
|
)
|
|
|
|
}
|
2019-11-14 06:01:23 -05:00
|
|
|
}
|