When I run the build I keep getting an error about licensing
what should i do…
Gradle
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.yaml-rest-test'
apply plugin: 'opensearch.pluginzip'
def pluginName = 'flexPlugin'
def pluginDescription = 'Custom plugin'
def projectPath = 'org.opensearch'
def pathToPlugin = 'flex'
def pluginClassName = 'FlexPlugin'
group = "FlexGroup"
tasks.register("preparePluginPathDirs") {
mustRunAfter clean
doLast {
def newPath = pathToPlugin.replace(".", "/")
mkdir "src/main/java/org/opensearch/$newPath"
mkdir "src/test/java/org/opensearch/$newPath"
mkdir "src/yamlRestTest/java/org/opensearch/$newPath"
}
}
opensearchplugin {
name pluginName
description pluginDescription
classname "${projectPath}.${pathToPlugin}.${pluginClassName}"
licenseFile rootProject.file('LICENSE.txt')
noticeFile rootProject.file('NOTICE.txt')
}
// This requires an additional Jar not published as part of build-tools
loggerUsageCheck.enabled = false
// No need to validate pom, as we do not upload to maven/sonatype
validateNebulaPom.enabled = false
buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "2.9.0")
}
repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.opensearch.gradle:build-tools:${opensearch_version}"
}
}
repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
test {
include '**/*Tests.class'
}
// updateVersion: Task to auto update version to the next development iteration
dependencies {
implementation 'com.google.guava:guava:32.1.1-jre'
implementation group: 'commons-codec', name: 'commons-codec', version: '1.15'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
}
LOG
10:48:44 PM: Executing 'build'...
> Configure project :
Plugin 'opensearch.pluginzip' is applied but no 'pluginZip' publication is defined.
=======================================
OpenSearch Build Hamster says Hello!
Gradle Version : 8.2.1
OS Info : Mac OS X 13.4 (aarch64)
JDK Version : 17 (Amazon Corretto JDK)
JAVA_HOME : /Users/sangkyun.kim/.sdkman/candidates/java/17.0.5-amzn
Random Testing Seed : 21D8E2D9AFD64F53
In FIPS 140 mode : false
=======================================
> Task :generateNotice UP-TO-DATE
> Task :compileJava UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :copyPluginPropertiesTemplate UP-TO-DATE
> Task :pluginProperties UP-TO-DATE
> Task :bundlePlugin UP-TO-DATE
> Task :generatePomFileForNebulaPublication
> Task :generatePom
> Task :javadoc UP-TO-DATE
> Task :javadocJar UP-TO-DATE
> Task :sourcesJar UP-TO-DATE
> Task :assemble
> Task :compileTestJava UP-TO-DATE
> Task :copyYamlTestsTask NO-SOURCE
> Task :copyRestApiSpecsTask NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :forbiddenApisResources UP-TO-DATE
> Task :forbiddenApisMain UP-TO-DATE
> Task :forbiddenApisTest UP-TO-DATE
> Task :compileYamlRestTestJava NO-SOURCE
> Task :processYamlRestTestResources NO-SOURCE
> Task :yamlRestTestClasses UP-TO-DATE
> Task :forbiddenApisYamlRestTest NO-SOURCE
> Task :forbiddenApis UP-TO-DATE
> Task :dependencyLicenses FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.2.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
15 actionable tasks: 2 executed, 13 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dependencyLicenses'.
> Missing LICENSE for guava-32.1.1-jre.jar, expected in guava-LICENSE.txt
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 250ms
10:48:45 PM: Execution finished 'build'.