license-gradle-plugin icon indicating copy to clipboard operation
license-gradle-plugin copied to clipboard

Unable to exclude resources

Open ftomassetti opened this issue 7 years ago • 7 comments
trafficstars

I tried all sort of configurations but I am unable to exclude the files under the resources directory to be updated:

exclude(["**/resources/**"])

Does not work for me. I have a multi module project.

ftomassetti avatar Nov 25 '17 16:11 ftomassetti

Thanks, I'll have a look.

hierynomus avatar Nov 27 '17 11:11 hierynomus

Just to clarify: the issue is that I have Java files in the src/test/resources directory of a subproject. The project where I using your plugin is a library to process Java code and those Java files are files used in tests to check the analysis is done correctly

ftomassetti avatar Nov 27 '17 12:11 ftomassetti

Very old issue but @ftomassetti if you're still watching, I ran into something similar and I think it's because the sourcesets are processed directly - that means the filenames are effectively java packages. "src/test/resources/test-files/Foo.java" is read as "test-files/Foo.java". So I'm able to exclude files with something like **/test-files/**. If you only want to exclude resources this may be tricky, but it also sort of makes sense since resources have the same classpath as the java directory so excluding from one excludes the other.

anuraaga avatar Nov 12 '19 07:11 anuraaga

Also seeing this. Being unable to exclude things like src/main/resources (yes there are java files there) makes the auto format feature unusable for me

jameskleeh avatar Apr 10 '20 13:04 jameskleeh

I ran into the same issue. I want to exclude a javascript file under src/main/resources. I can work around it by adding a subdirectory between resources and the file, but would be nice to exclude resource files from license check.

lightningrob avatar May 27 '20 07:05 lightningrob

@lightningrob can you please explain more about your suggested workaround?

shabtaisharon avatar Jun 10 '20 16:06 shabtaisharon

@lightningrob can you please explain more about your suggested workaround?

I ended up excluding the specific files by name with no wildcards. Sorry not much help.

lightningrob avatar Jun 10 '20 18:06 lightningrob