Plugin fails with forbiddenapis:1.7:check

[INFO] Scanning for API signatures and dependencies...
[ERROR] Forbidden class/interface/annotation use: java.nio.file.Paths [Use org.elasticsearch.common.io.PathUtils.get() instead.]
[ERROR] in org.elasticsearch.common.io.PathUtils (PathUtils.java:75)
[ERROR] Forbidden method invocation: org.elasticsearch.common.io.PathUtils#get(java.net.URI) [Don't try reading from paths that are not configured in Environment, resolve from Environment instead]
[ERROR] in org.elasticsearch.common.io.PathUtils (PathUtils.java:101)
[ERROR] Forbidden method invocation: java.nio.file.FileSystems#getDefault() [use org.elasticsearch.common.io.PathUtils.getDefaultFileSystem() instead.]
[ERROR] in org.elasticsearch.common.io.PathUtils (PathUtils.java:44)
[ERROR] Forbidden method invocation: org.apache.lucene.index.IndexReader#addReaderClosedListener(org.apache.lucene.index.IndexReader$ReaderClosedListener) [Close listeners can only installed via ElasticsearchDirectoryReader#addReaderCloseListener]
[ERROR] in org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader (ElasticsearchDirectoryReader.java:88)
[ERROR] Forbidden method invocation: java.lang.Math#abs(int) [Beware of the behavior of this method on MIN_VALUE]
[ERROR] in org.elasticsearch.common.math.UnboxedMathUtils (UnboxedMathUtils.java:463)
[ERROR] Forbidden method invocation: java.lang.Math#abs(long) [Beware of the behavior of this method on MIN_VALUE]
[ERROR] in org.elasticsearch.common.math.UnboxedMathUtils (UnboxedMathUtils.java:468)
[ERROR] Forbidden method invocation: org.apache.lucene.util.Version#parseLeniently(java.lang.String) [Use Lucene.parseLenient instead it strips off minor version]

many errors like this occurred ,,,

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Build Tools and Resources .......................... SUCCESS [ 0.620 s]
[INFO] Rest API Specification ............................. SUCCESS [ 0.312 s]
[INFO] Elasticsearch: Parent POM .......................... SUCCESS [ 5.387 s]
[INFO] Elasticsearch: Core ................................ FAILURE [ 7.208 s]
[INFO] Distribution: Parent POM ........................... SKIPPED

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.939 s
[INFO] Finished at: 2016-09-26T06:00:15-05:00
[INFO] Final Memory: 49M/378M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal de.thetaphi:forbiddenapis:1.7:check (check-forbidden-apis) on project elasticsearch: Check for forbidden API calls failed, see log. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

I am getting this error when I wanted to create a custom plugin .
followed all the dir structure
when I try to build it I get this error .

followed this link : https://blog.iterativ.ch/2014/04/11/listindices-writing-your-first-elasticsearch-java-plugin/

please do help ...

Please format your code/logs.

Logs are telling you the details of what is wrong and often what you should do to fix.
Just apply the suggestions.