[
https://issues.apache.org/jira/browse/FELIX-5694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16322220#comment-16322220
]
Neil Bartlett commented on FELIX-5694:
--------------------------------------
To clarify, the name attribute on the component is not the "service name", it's
just the name of the component. All components have a name, but if you don't
provide one then SCR defaults it to the FQCN of the class.
While the name of the generated XML file is essentially arbitrary, it sounds
like Eclipse is closer to doing the right thing here, because once you have
specified a name for the component the FQCN should not be used except in the
implementationClass element of the XML.
If this needs to be fixed in bnd then I can do it as I am a committer there.
But I'll let Carsten (or whoever) clarify whether this is really a bnd or a
plugin issue.
> maven-scr-plugin use service name property as filename.xml
> ----------------------------------------------------------
>
> Key: FELIX-5694
> URL: https://issues.apache.org/jira/browse/FELIX-5694
> Project: Felix
> Issue Type: New Feature
> Components: Maven Bundle Plugin
> Reporter: Stefan Triller
> Labels: features, maven
>
> Hi,
> the current maven-scr-plugin uses the fully qualified class name as a name
> for the xml file that will contain the generated service description.
> Unfortunately the Eclipse IDE uses the service name as the name for the xml
> file, i.e. for
> {code:java}
> package org.mycompany;
> @Component(name = "org.topic.myservice")
> public class MyClassName {
> {code}
> it would create "org.topic.myservice.xml" inside the OSGI-INF directory.
> At the moment your maven-scr-plugin would create
> "org.mycompany.MyClassName.xml".
> if you use both, maven and the Eclipse IDE on the same workspace this will
> result in duplicate service descriptions.
> Would it be possible for you to implement a new option that allows for using
> the service name (if set) as a name for the generated xml file?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)