Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-6446

Complexities around enhancing classes with their resource name

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The uimaFIT Maven Plugin contains a mojo called enhance. This mojo adds a ResourceMetaData annotation to every class that does not already have one.
      In that case, it also sets the name field using the resource class name.

      Now consider the following scenario:

      • component class Child inherits from (abstract) component class Parent
      • for some reason, the class Parent has been enhanced and therefore carries an auto-generated ResourceMetaData("Parent") annotation
      • for some reason, the class Child has not been enhanced and also does not carry a ResourceMetaData annotation

      When generating a descriptor for the component now, e.g. using createEngineDescription(Child.class, the name of the resulting component will be Parent.

      It would seem the approach to solve this problem is to only consider the ResourceMetaData.name field when it is defined directly on a component. However, for the other fields like copyright, description, vendor, version it would likewise seem problematic to look them up in parent classes. In many cases, the parent and the child will be in the same project - but in many other cases, they may also not be.

      It would seem the bug is not in the uimaFIT Maven Plugin for generating the ResourceMetaData annotation (even on abstract classes), but rather in createEngineDescription-and-friends for looking in superclasses for ResourceMetaData annotations.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rec Richard Eckart de Castilho
            rec Richard Eckart de Castilho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment