Skip to content

Execution failed for task ':licenseHeaders' while executing the build on latest release(2.11.0.0) as well on main branch for x86_64 architecture. #3691

@pratiktonage

Description

@pratiktonage

Hi Team,
I am working on validating OpenSearch security plugin on latest release version 2.11.0.0 for x86_64 architecture.
Encountered an error while building the project with ./gradlew build command.
Build failure with the following error:
Full logs for the same:

Starting a Gradle Daemon (subsequent builds will be faster)
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.2.1
  OS Info               : Linux 5.14.0-162.18.1.el9_1.ppc64le (ppc64le)
  JDK Version           : 17 (Red Hat, Inc. JDK)
  JAVA_HOME             : /usr/lib/jvm/java-17-openjdk-17.0.9.0.9-2.el8.ppc64le
  Random Testing Seed   : 4F4D872A859ADABB
  In FIPS 140 mode      : false
=======================================

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :processResources
> Task :classes
> Task :jar
> Task :copyPluginPropertiesTemplate
> Task :pluginProperties
> Task :bundlePlugin
> Task :generatePomFileForMavenPublication
> Task :generatePomFileForNebulaPublication
> Task :generatePomFileForPluginZipPublication
> Task :generatePom
> Task :javadoc SKIPPED
> Task :javadocJar
> Task :sourcesJar
> Task :assemble

> Task :compileIntegrationTestJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :processIntegrationTestResources
> Task :integrationTestClasses

> Task :compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :processTestResources
> Task :testClasses
> Task :forbiddenApisResources
> Task :forbiddenApisIntegrationTest SKIPPED
> Task :forbiddenApisMain SKIPPED
> Task :forbiddenApisTest SKIPPED
> Task :forbiddenApis UP-TO-DATE
> Task :dependencyLicenses SKIPPED
> Task :filepermissions SKIPPED
> Task :forbiddenPatterns SKIPPED
> Task :jarHell

**> Task :licenseHeaders FAILED

Files with unapproved licenses:

  /home/user1/security/src/integrationTest/java/org/opensearch/security/ResourceFocusedTests.java
  /home/user1/security/src/main/java/org/opensearch/security/filter/NettyAttribute.java
  /home/user1/security/src/main/java/org/opensearch/security/filter/SecurityRestUtils.java
  /home/user1/security/src/test/java/org/opensearch/security/filter/SecurityRestFilterUnitTests.java


> Task :checkstyleIntegrationTest
> Task :checkstyleMain
> Task :checkstyleTest

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':licenseHeaders'.
> License header problems were found! Full details: /home/user1/security/build/reports/licenseHeaders/rat.log**

* 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.

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.

BUILD FAILED in 1m 56s
21 actionable tasks: 21 executed

Steps to reproduce the behavior:
1 Install JDK 11/JDK 17
2 Install other dependencies
sudo yum install -y git gcc make java-11-openjdk-devel python39 python39-devel bzip2-devel zlib-devel openssl-devel
3 Clone the repository
4 cd security
git checkout 2.11.0.0
5 ./gradlew build

Any suggestions and pointers regarding the same will be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions