Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-1726

SCR Annotations - Enhance error messages in case of missing project dependencies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • maven-scr-plugin-1.4.0
    • maven-scr-plugin-1.4.2
    • SCR Tooling
    • None

    Description

      in rev. 821022 felix removed some dependencies that where unneeded for the code that existed in the scr plugin itself.
      there where unneeded to compile the plugin, but they are needed in some usecases for annotation parsing.
      e.g. if a project's class is annotated with SCR annotations, and at the same time declares a static field with a slf4j Logger class, reading other static string field values fails with a ClassNotFound exception pointing to a slf4j class.

      re-adding the slf4j dependencies again solves the problem.

      unfortunately the exception handling in this case is not good - the message is only "Somehing went wrong.", because the ClassNotFound exception was swallowed in ClassUtil.getInitializationExpression method.

      Attachments

        1. felix.patch
          3 kB
          Carsten Ziegeler

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              sseifert Stefan Seifert
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: