felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5150) Add property to define output filename of generated component.xml
Date Thu, 12 May 2016 06:33:12 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15281248#comment-15281248
] 

Carsten Ziegeler commented on FELIX-5150:
-----------------------------------------

While I see the advantage of this, doing an automatic shortening is a little bit tricky: the
same class name might be used in two different packages. For a full build, this is no problem,
as the plugin knows all classes and can do the correct shortening, creating a unique name.
However as we support incremental builds, the plugin might only get one of the class files
as being changed and doesn't know about the other. There are other issues, like deleting it
with refactoring etc.
So I think there are two ways where this would work:
a) if the developer provides the filename through some annotation
b) we provide a global switch for the maven plugin to just use the classname.
With both approaches it's up to the developer to think about clashes and take care of them.

Both options are dangerous as things can go wrong (e.g. same class name in different packages)
and I'm wondering who many developers will use one of these approaches?

> Add property to define output filename of generated component.xml
> -----------------------------------------------------------------
>
>                 Key: FELIX-5150
>                 URL: https://issues.apache.org/jira/browse/FELIX-5150
>             Project: Felix
>          Issue Type: Bug
>          Components: SCR Tooling
>            Reporter: Marco Descher
>            Priority: Minor
>
> Using the maven-scr-plugin it is possible to divert the generation of component.xml files
into the OSGI-INF/ directory. It seems, however, not possible to determine the generated filename,
s.t. the full class name is used as filename.
> For readability I propose to add a property to only use the short class name on generating
the XML file, or to even be capable of providing a result classname within the resp. Component
annotation



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message