Why is Maven Runtime returning no information when introspecting?

This may be for one of the following reasons:

  • Maven Runtime is being run within an IDE. This is because the Maven descriptor files created by Maven Archiver are not present, and these files are used to obtain Maven project metadata. Maven Runtime will return the correct information when run within the project's normal packaging.
  • Maven Archiver has been configured to not generate Maven descriptors. If the addMavenDescriptor configuration parameter has been set to false, then Maven Runtime will not be able to access project's Maven metadata at runtime. This parameter must be set to true in order to use Maven Runtime.


Why is Maven Runtime returning the wrong project for a given class?

This can happen if multiple Maven descriptors are present relative to the class. Typically this occurs when multiple Maven projects are merged into a single archive. For example, when using Maven Assembly Plugin's jar-with-dependencies.