[
https://issues.apache.org/jira/browse/FELIX-5694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16322542#comment-16322542
]
Stefan Triller commented on FELIX-5694:
---------------------------------------
I have tried the recommendation in this FAQ:
http://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html#use-scr-metadata-generated-by-bnd-in-unit-tests
I have put the example into my pom.xml unter " <build><plugins>".
It also says that it is configured with dsAnnotations (maven -X install
output):
{{[INFO] --- maven-bundle-plugin:3.0.1:manifest (scr-metadata) @
org.eclipse.smarthome.binding.astro ---
[DEBUG] Configuring mojo org.apache.felix:maven-bundle-plugin:3.0.1:manifest
from plugin realm
ClassRealm[extension>org.apache.felix:maven-bundle-plugin:3.0.1, parent:
sun.misc.Launcher$AppClassLoader@5c647e05]
[DEBUG] Configuring mojo 'org.apache.felix:maven-bundle-plugin:3.0.1:manifest'
with basic configurator -->
[DEBUG] (f) buildDirectory =
/home/stefan/smarthome-master/git/smarthome/extensions/binding/org.eclipse.smarthome.binding.astro/target
[DEBUG] (f) dependencyReducedPomLocation =
/home/stefan/smarthome-master/git/smarthome/extensions/binding/org.eclipse.smarthome.binding.astro/dependency-reduced-pom.xml
[DEBUG] (f) finalName = org.eclipse.smarthome.binding.astro-0.10.0-SNAPSHOT
[DEBUG] (f) instructions = {_dsannotations=*}
[DEBUG] (f) localRepository = id: local
url: file:///home/stefan/.m2/repository/
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => true, update => always]
[DEBUG] (f) m_mavenSession = org.apache.maven.execution.MavenSession@227b9277
[DEBUG] (f) manifestLocation =
/home/stefan/smarthome-master/git/smarthome/extensions/binding/org.eclipse.smarthome.binding.astro/target/classes/META-INF
[DEBUG] (f) niceManifest = false
[DEBUG] (f) outputDirectory =
/home/stefan/smarthome-master/git/smarthome/extensions/binding/org.eclipse.smarthome.binding.astro/target/classes
[DEBUG] (f) project = MavenProject:
org.eclipse.smarthome.binding:org.eclipse.smarthome.binding.astro:0.10.0-SNAPSHOT
@
/home/stefan/smarthome-master/git/smarthome/extensions/binding/org.eclipse.smarthome.binding.astro/pom.xml
[DEBUG] (f) remoteArtifactRepositories = [ id: jcenter
url: https://jcenter.bintray.com
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => never]
, id: central
url: https://repo.maven.apache.org/maven2
layout: default
snapshots: [enabled => false, update => daily]
releases: [enabled => true, update => daily]
]
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@227b9277
[DEBUG] (f) supportedProjectTypes = [jar, bundle, eclipse-plugin]
[DEBUG] -- end configuration --}}
But I do not get any .xml files generated.
Also I probably have to say that we do not use the bnd tools in out build
framework so far and we are also not planning to change that in the near future.
> 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)