felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Prager <be...@prager.ws>
Subject Re: SCR Annotations BndTools: Service-Component entry can not be located in JAR
Date Thu, 26 Mar 2015 15:17:53 GMT
I confirm, it's working.
Thank you!

On 26.03.2015 08:26, Pierre De Rop wrote:
> I just created a jira issue (FELIX-4836) and committed a candidate 
> fix in
> revision 1669348.
> Also, I had to fix some wrong versions in the bnd and scrtask pom.xml
> files: now these two poms are depending on 
> org.apache.felix.scr.annotations
> with version=1.9.11-SNAPSHOT instead of old 1.9.9-SNAPSHOT.
>
> You can now recompile the scrplugin project from the trunk. To rebuid 
> the
> trunk:
>
> cd /tmp/
> svn checkout http://svn.apache.org/repos/asf/felix/trunk/scrplugin 
> scrplugin
> cd scrplugin
> mvn clean package -Dmaven.test.skip=true
>
> Then copy 
> bnd-scr-plugin/target/org.apache.felix.scr.bnd-1.3.1-SNAPSHOT.jar
> to your workspace bndtools project, in
> cnf/plugins/org.apache.felix.scr.bnd/ directory, and update the 
> bndtools
> plugin path and the -buildpath options in order to use the 
> 1.3.1-SNAPSHOT
> version instead of the 1.3.0 snapshot.
>
> Hope it will work in your environment (I just tested it).
>
> cheers
> /Pierre
>
> On Thu, Mar 26, 2015 at 12:46 PM, Bernd Prager <bernd@prager.ws> 
> wrote:
>
>> Thank you very much Pierre for the quick response. Good job.
>>
>> Sent from my iPhone
>>
>> > On Mar 26, 2015, at 7:30 AM, Pierre De Rop 
>> <pierre.derop@gmail.com>
>> wrote:
>> >
>> > Ok, Bernd;
>> >
>> > I understand what is going on: now with BndTools 2.4.1 and with 
>> latest
>> > bndtools,  the SCR bnd plugin is now invoked twice (i don't know 
>> the
>> reason
>> > why).
>> >
>> > So, I will commit a quick fix so you can go ahead with the trunk 
>> version.
>> >
>> >
>> > best regards;
>> > /Pierre
>> >
>> > On Thu, Mar 26, 2015 at 9:18 AM, Pierre De Rop 
>> <pierre.derop@gmail.com>
>> > wrote:
>> >
>> >> Hello Bernd,
>> >>
>> >> Sorry for this, indeed I just reproduced the issue with bndtools 
>> 2.4.1
>> >> (but as far as I remember, the tutorial worked fine with previous
>> bndtools
>> >> versions, or may be there is a regression somewhere).
>> >>
>> >> I will investigate this and will get back to you asap.
>> >>
>> >> PS: if you are using Apache Scr annotations, there is no need to 
>> supply
>> >> the -dsannotations:  *, which is only required when using 
>> standard scr
>> >> annotations, not scrplugin annotation).
>> >>
>> >>
>> >>
>> >> best regards;
>> >> /Pierre
>> >>
>> >>
>> >>
>> >>> On Thu, Mar 26, 2015 at 3:38 AM, Bernd Prager <bernd@prager.ws>

>> wrote:
>> >>>
>> >>> Hello.
>> >>>
>> >>> I am walking to the tutorial here: http://felix.apache.org/
>> >>> documentation/subprojects/apache-felix-maven-scr-plugin/
>> >>> apache-felix-scr-bndtools-use.html
>> >>>
>> >>> Everything goes according to plan until the very end, when I get 
>> hit
>> with
>> >>> the error message:
>> >>> "Service-Component entry can not be located in JAR:
>> >>> OSGI-INF/greeting.impl.GreetingImpl.xml~    bnd.bnd /greeting
>> >>> Unknown    Bndtools Problem Marker"
>> >>>
>> >>> The created directory structure looks like:
>> >>> ./.classpath
>> >>> ./.gitignore
>> >>> ./.project
>> >>> ./.settings
>> >>> ./.settings/org.eclipse.jdt.core.prefs
>> >>> ./bin
>> >>> ./bin/greeting
>> >>> ./bin/greeting/api
>> >>> ./bin/greeting/api/Greeting.class
>> >>> ./bin/greeting/impl
>> >>> ./bin/greeting/impl/GreetingImpl.class
>> >>> ./bin/OSGI-INF
>> >>> ./bin/OSGI-INF/greeting.impl.GreetingImpl.xml
>> >>> ./bin_test
>> >>> ./bnd.bnd
>> >>> ./generated
>> >>> ./launch.bndrun
>> >>> ./src
>> >>> ./src/greeting
>> >>> ./src/greeting/api
>> >>> ./src/greeting/api/Greeting.java
>> >>> ./src/greeting/impl
>> >>> ./src/greeting/impl/GreetingImpl.java
>> >>> ./test
>> >>>
>> >>> Also the generated metatype descriptor 
>> greeting.impl.GreetingImpl.xml
>> >>> looks ok to me:
>> >>>
>> >>> <?xml version="1.0" encoding="UTF-8"?>
>> >>> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
>> >>> immediate="true" name="greeting.impl.GreetingImpl" 
>> activate="start">
>> >>>    <implementation class="greeting.impl.GreetingImpl"/>
>> >>>    <service servicefactory="false">
>> >>>        <provide interface="greeting.api.Greeting"/>
>> >>>    </service>
>> >>>    <property name="service.pid" 
>> value="greeting.impl.GreetingImpl"/>
>> >>> </scr:component>
>> >>>
>> >>> The bnd.bnd file is:
>> >>> -buildpath:  \
>> >>>    osgi.core,\
>> >>>    osgi.cmpn,\
>> >>>    biz.aQute.bnd.annotation,\
>> >>>    ${junit}
>> >>> Bundle-Version: 0.0.0.${tstamp}
>> >>> -buildpath: ${plugin-dir}/org.apache.felix.scr.bnd/org.apache.
>> >>> felix.scr.bnd-1.3.1-SNAPSHOT.jar;version=file
>> >>> -plugin:
>> org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;log=debug
>> >>> Private-Package: greeting.impl
>> >>> Export-Package: greeting.api
>> >>> -dsannotations:  \
>> >>>    *
>> >>> javac.source = 1.7
>> >>> javac.target = 1.7
>> >>>
>> >>>
>> >>> Any ideas what might have gone wrong?
>> >>>
>> >>> Thank you for any help,
>> >>> -- Bernd
>> >>>
>> >>> 
>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>> For additional commands, e-mail: users-help@felix.apache.org
>> >>
>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message