Carsten Ziegeler created FELIX-4101:
---------------------------------------
Summary: Create metatype.properties file when description and
label are inlined
Key: FELIX-4101
URL: https://issues.apache.org/jira/browse/FELIX-4101
Project: Felix
Issue Type: Improvement
Components: Maven SCR Plugin
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
Fix For: maven-scr-plugin 1.14.0, scr ant task 1.8.0, scr
generator 1.8.0
We advertise the SCR annotations with "single source development" = everything
is in a single java source file, no need to edit any other file (like the DS
xml descriptor). However as soon as you use metatype information this is not
necessarily true, especially if you want to put the real values in a separate
metatype.properties file.
This somehow breaks the ease of use promise and requires to keep the source
code and the metatype properties in sync.
We could easily get away with this by always creating a metatype.properties
file when information like label or description is inlined, e.g.
@Property(label = "Velocity", description="Set the velocity", name="velocity")
will
create a metatype.properties file with
PID.velocity.name = Velocity
PID.velocity.description = Set the velocity
and a metatype XML with
<AD id="velocity" type="String" default="" name="%PID.velocity.name
description="%PID.velocity.description"/>
This would allow to add translations even if the information was inlined in the
source code.
We could add a switch whether this should be enabled or not, default set to
true. I think we need this switch just for the (rare?) case where within the
same bundles some metatype is inlined while other metatype info is within a
metatype.properties. - we could even handle this by merging a potentially
existing props file with the generated.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira