license-gradle-plugin
license-gradle-plugin copied to clipboard
Excluding folders?
Hello is it possible to exclude entire folders from the task without changing the sourceSets? I have tried all possible combinations of exclusion patters, none seem to be working.
I have also tried to achieve this, and failed. In our case we have java source code generated through wsdl2java, and I have not been able to exclude this folder of generated code from the checks, resulting in a failed build if ignoreFailures is false.
I have tried a lot of different things, most of them variations on the following:
exclude "/generatedSource//*"
I would assume (note I have not tested this) that the following should work:
license {
exclude "**/generatedSource/**"
}
A "best practice" is for generated code to end up in a different source directory, for instance src/main/generated
.
What you suggest is what I have tried without success. In fact, we store the generated source under the build directory, i.e. it is not even in the real source tree. Still I can't get it to be excluded.
Btw, I see now that my first comment was mangled by the Markdown processor (I assume). I use the same pattern as you suggest in your reply.
The problem with **generatedSource**
is that it excludes ALL folder containing that name. We want to exclude a third-party API inside the API folder, so when we exclude api
our API is also excluded.
@hierynomus I would've assumed the same thing as its standard ANT notation, however I face the same problem of not being able to exclude directories. Tried this but also formatting like: /my/path/**
to exclude all files and paths underneath that. This doesn't work but should according to http://ant.apache.org/manual/dirtasks.html#patterns
Anyone here had luck figuring this one out?