question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Code scanners should exclude META-INF by default

See original GitHub issue

Scanners that are only supposed to scan code (and not resources) should by default have a path filter to exclude the META-INF directory. Otherwise, if logging is enabled, the log gets cluttered with output like

09:38:56.774 [main] DEBUG org.reflections.Reflections - could not scan file META-INF/MANIFEST.MF in url file:/.../annotations-13.0.jar with scanner SubTypesScanner
09:38:56.774 [main] DEBUG org.reflections.Reflections - could not scan file META-INF/MANIFEST.MF in url file:/.../annotations-13.0.jar with scanner TypeAnnotationsScanner

for a simple call to getSubTypesOf().

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
xaviersd77commented, Oct 26, 2021

I came across same issue, seeing exceptions when debug enabled, and this got fixed after upgrading to 0.9.12. Hope this helps someone…! Main issue was in 0.9.11 scan method had : if (scanner.acceptsInput(path) || scanner.acceptResult(fqn)) and in 0.9.12 it is changed to: if (scanner.acceptsInput(path) || scanner.acceptsInput(fqn))

1reaction
ymamakiscommented, Dec 14, 2018

Hi there, Can it be related to this? https://github.com/DiUS/pact-jvm/issues/382

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it safe to exclude("META-INF/*kotlin_module")?
We had to introduce a new resource file that is required to compile Kotlin code against Kotlin binaries. Its name is META-INF/<module_name>.
Read more >
Maven Getting Started Guide
The defaults for Maven are often sufficient, but if you need to change the cache ... So you can see in our example...
Read more >
Spring Boot Reference Documentation
Spring Security: Default Security Configuration, Auto-configuration for OAuth2, ... All META-INF/spring-devtools.properties from the classpath are loaded.
Read more >
A Beginner's Guide to JPA's persistence.xml - Thorben Janssen
In the next step, you can use the exclude-unlisted-classes element to exclude all ... By default, your persistence provider checks if the META-INF...
Read more >
Building Java Libraries Sample - Gradle User Manual
You can follow the guide step-by-step to create a new project from scratch ... 2: application 3: library 4: Gradle plugin Enter selection...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found