Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
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
Attachments
Issue Links
- links to