[ https://issues.apache.org/jira/browse/FELIX-4101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13674369#comment-13674369 ]
Carsten Ziegeler commented on FELIX-4101: ----------------------------------------- Actually we can generate a separate properties file per component, so there won't be any clash with metatype.properties and we're fully compatibel and don't need a switch: If all metatype information of a component is inlined, we generate a separate properties file just for this component Otherwise everything as before. > 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