# ./gradlew clean check is giving error \> Task :licenseHeaders FAILED

**URL:** <https://discuss.elastic.co/t/gradlew-clean-check-is-giving-error-task-licenseheaders-failed/273745>\
**Category:** Elasticsearch\
**Created:** [May 23, 2021, 3:23am UTC](https://discuss.elastic.co/t/gradlew-clean-check-is-giving-error-task-licenseheaders-failed/273745 "2021-05-23T03:23:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreekumar\_Chathambil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sreekumar_chathambil/32/82772_2.png) [@Sreekumar\_Chathambil](https://discuss.elastic.co/u/Sreekumar_Chathambil)\
**Post date:** [May 23, 2021, 3:23am UTC](https://discuss.elastic.co/t/gradlew-clean-check-is-giving-error-task-licenseheaders-failed/273745/1 "2021-05-23T03:23:39Z")

</div>

Hi,

I am new to plugin development.

I have created ingest-plugin project using cookiecutter for the version 7.9.0 and tried checking with ./gradle clean check. i was getting an error

Task :licenseHeaders FAILED

Unapproved licenses:

/home/piway/projects/my-plugin/ingest-projecta/src/main/java/org/elasticsearch/plugin/ingest/projecta/IngestProjectaPlugin.java  
/home/piway/projects/my-plugin/ingest-projecta/src/main/java/org/elasticsearch/plugin/ingest/projecta/ProjectaProcessor.java  
/home/piway/projects/my-plugin/ingest-projecta/src/test/java/org/elasticsearch/plugin/ingest/projecta/ProjectaProcessorTests.java  
/home/piway/projects/my-plugin/ingest-projecta/src/yamlRestTest/java/org/elasticsearch/plugin/ingest/projecta/ProjectaRestIT.java

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ':licenseHeaders'.

> License header problems were found! Full details: /home/piway/projects/my-plugin/ingest-projecta/build/reports/licenseHeaders/rat.log

## rat.log

## Summary

Generated at: 2021-05-23T08:31:58+05:30  
Notes: 0  
Binaries: 0  
Archives: 0  
Standards: 4

Apache Licensed: 4  
Generated Documents: 0

JavaDocs are generated and so license header is optional  
Generated files do not required license headers

0 Unknown Licenses

* * *

Unapproved licenses:

/home/piway/projects/my-plugin/ingest-projecta/src/main/java/org/elasticsearch/plugin/ingest/projecta/IngestProjectaPlugin.java  
/home/piway/projects/my-plugin/ingest-projecta/src/main/java/org/elasticsearch/plugin/ingest/projecta/ProjectaProcessor.java  
/home/piway/projects/my-plugin/ingest-projecta/src/test/java/org/elasticsearch/plugin/ingest/projecta/ProjectaProcessorTests.java  
/home/piway/projects/my-plugin/ingest-projecta/src/yamlRestTest/java/org/elasticsearch/plugin/ingest/projecta/ProjectaRestIT.java

* * *

Archives:

* * *

Files with Apache License headers will be marked AL  
Binary files (which do not require AL headers) will be marked B  
Compressed archives will be marked A  
Notices, licenses etc will be marked N  
!AL /home/piway/projects/my-plugin/ingest-projecta/src/main/java/org/elasticsearch/plugin/ingest/projecta/IngestProjectaPlugin.java  
!AL /home/piway/projects/my-plugin/ingest-projecta/src/main/java/org/elasticsearch/plugin/ingest/projecta/ProjectaProcessor.java  
!AL /home/piway/projects/my-plugin/ingest-projecta/src/test/java/org/elasticsearch/plugin/ingest/projecta/ProjectaProcessorTests.java  
!AL /home/piway/projects/my-plugin/ingest-projecta/src/yamlRestTest/java/org/elasticsearch/plugin/ingest/projecta/ProjectaRestIT.java

* * *

Printing headers for files without AL header...

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [May 25, 2021, 10:30am UTC](https://discuss.elastic.co/t/gradlew-clean-check-is-giving-error-task-licenseheaders-failed/273745/2 "2021-05-25T10:30:50Z")

</div>

This is part of the build-tools suite for building custom plugin, but merely an internal helper to ensure that the Elasticsearch source files always have a license. You could customize this or disable by putting `licenseHeaders.enabled = false` in your gradle file.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2021, 10:31am UTC](https://discuss.elastic.co/t/gradlew-clean-check-is-giving-error-task-licenseheaders-failed/273745/3 "2021-06-22T10:31:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
