Carsten Ziegeler said the following on 07/27/2009 02:41 PM: > Reto Bachmann-Gmür wrote: > >> Hello >> >> I was hoping that with support for annotations the scr plugin would work >> with scala code as well. But in my mixed java/scala project it seems to >> only look at the annotations in the java sources. >> >> @Component >> public class Service { >> >> @Property(value = "default value") >> static final String CONSTANT_NAME = "property.name"; >> } >> >> ---> results in an entry in OSGI-INF/serviceComponents.xml >> >> package org.trialox.sandbox.scr { >> @Component class ScalaService { >> >> @Property{ val value = Array("default value")} >> val CONSTANT_NAME = "property.name"; >> } >> } >> >> --> no mention in OSGI-INF/serviceComponents.xml >> >> do I need particular settings for the scr plugin to have it look at the >> scala file as well? >> >> > Interesting use case :) > > Now, the scr plugin scans java source files - even with the annotations. > I've no idea how the maven scala integration works, so what is > generated? Is this a java source file or a compiled class? > the scala source file resides in src/main/scala, it is compiled to bytecode by the maven plugin org.scala-tools:maven-scala-plugin from http://scala-tools.org/repo-releases (no java code is generated).
I guess things would be much easier if the RetentionPolicy would be CLASS and the xml generated from the class-files. Adding bind-methods might however be harder to be done in a language agnostic fashion. Reto > Carsten > > >> Cheers, >> reto >> >> > > > -- Reto Bachmann-Gmür trialox.org Tel: +41445005015 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org