0

I am using google reflections in my maven plugin to get some classes with annotations. As in my project I gave only one url and it has 3 keys, but instead it is showing scanned 108 urls and 0 keys. What could be missing, I am using 0.9.9 version of google reflections.

pjanssen
  • 1,065
  • 13
  • 35
chao
  • 9
  • 6
  • 1
    Are you using the correct classpath cause plugins have their own classpath? – khmarbaise Mar 08 '15 at 12:22
  • does adding the dependency to that plugin help? plugins can have dependencies too. – wemu Mar 08 '15 at 12:26
  • @khmarbaise can you give any resource where I can know about plugin classpath as of now I am using simple classpath("mypackage.resource") type. – chao Mar 09 '15 at 03:05
  • @wemu can you please tell which dependency you are talking about? – chao Mar 09 '15 at 03:05
  • You can check it via `mvn -X ...` there you find in the log file the classpath for the appropriate plugin. Whatever plugin we are talking about... – khmarbaise Mar 09 '15 at 15:23
  • what classes are you expecting? and are those available to the plugin? since the plugin does not share the classpath with the project those classes need to be added as dependency into the section as well. – wemu Mar 10 '15 at 11:01
  • Classes are in the project in which plugin is included. Classpath is provided to plugin via plugin parameters in POM.xml file. And the problem is that plugin is not able to access those files. – chao Mar 10 '15 at 11:26
  • Possible duplicate of [Unit test using the Reflections google library fails only when executed by Maven](http://stackoverflow.com/questions/13576665/unit-test-using-the-reflections-google-library-fails-only-when-executed-by-maven) – Sergey Vyacheslavovich Brunov Mar 09 '16 at 08:46

0 Answers0