Hi Christian,
I guess I found a bug [😊] your suggestion works if bndrun file *has a* "-runbundles:" entry. value can be empty or some other value. However, if there is a value from the previous build and you add a new "-runrequires" and do a build "-runrequires" entry is replaced by the additional runbundles instead of union of the required bundles. Every time you do a build it oscillates between the dependencies. here is how you can reproduce it: -runrequires: \ osgi.identity;filter:='(osgi.identity=osgi.enroute.examples.eval.simple.provider)',\ -runbundles: {intentially empty} then run mvn install with the configuration below, then you get -runrequires: \ osgi.identity;filter:='(osgi.identity=osgi.enroute.examples.eval.simple.provider)',\ -runbundles: \ org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\ org.apache.felix.log;version='[1.0.1,1.0.2)',\ org.apache.felix.scr;version='[2.0.2,2.0.3)',\ org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\ org.osgi.service.metatype;version='[1.3.0,1.3.1)',\ osgi.enroute.examples.eval.simple.provider;version='[1.0.0,1.0.1)' now change the runrequires as follows -runrequires: \ osgi.identity;filter:='(osgi.identity=osgi.enroute.examples.eval.simple.provider)',\ osgi.identity;filter:='(osgi.identity=osgi.enroute.gogo.shell.provider)' And run mvn install again, you will get -runbundles: \ org.apache.felix.gogo.runtime;version='[0.16.2,0.16.3)',\ osgi.enroute.gogo.shell.provider;version='[2.0.0,2.0.1)' If you run mvn install at this stage without making any change then the run bundles will look like the previous build, i.e. -runbundles: \ org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\ org.apache.felix.log;version='[1.0.1,1.0.2)',\ org.apache.felix.scr;version='[2.0.2,2.0.3)',\ org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\ org.osgi.service.metatype;version='[1.3.0,1.3.1)',\ osgi.enroute.examples.eval.simple.provider;version='[1.0.0,1.0.1)' To get the *union* of resolutions then you need to clean the "-runbundles" and run mvn install again, i.e. -runbundles: \ org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\ org.apache.felix.gogo.runtime;version='[0.16.2,0.16.3)',\ org.apache.felix.log;version='[1.0.1,1.0.2)',\ org.apache.felix.scr;version='[2.0.2,2.0.3)',\ org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\ org.osgi.service.metatype;version='[1.3.0,1.3.1)',\ osgi.enroute.examples.eval.simple.provider;version='[1.0.0,1.0.1)',\ osgi.enroute.gogo.shell.provider;version='[2.0.0,2.0.1)' It think this is a bug and quite dangerous since it will break the runtime aggregation and will make many people lose a lot hours trying to debug the problem. Cheers -Daghan ________________________________ From: osgi-dev-boun...@mail.osgi.org <osgi-dev-boun...@mail.osgi.org> on behalf of Daghan ACAY <daghana...@hotmail.com> Sent: Sunday, November 13, 2016 6:26 AM To: OSGi Developer Mail List Subject: Re: [osgi-dev] OSGi enRoute Maven Testers wanted ... Hi Christian, I tried your suggestion inside the bndrun project as follows: <build> <plugins> <plugin> <groupId>biz.aQute.bnd</groupId> <artifactId>bnd-export-maven-plugin</artifactId> <version>3.4.0-SNAPSHOT</version> <configuration> <resolve>true</resolve> <failOnChanges>false</failOnChanges> <bndruns> <bndrun>osgi.enroute.examples.eval.bndrun</bndrun> </bndruns> <targetDir>.</targetDir> </configuration> <executions> <execution> <goals> <goal>export</goal> </goals> </execution> </executions> </plugin> </plugins> </build> The following still gives the same error bndrun $ mvn install Result: [INFO] --- bnd-export-maven-plugin:3.4.0-SNAPSHOT:export (default) @ osgi.enroute.examples.eval.bndrun --- -runbundles: \ org.apache.felix.configadmin; version='[1.8.8,1.8.9)',\ org.apache.felix.log; version='[1.0.1,1.0.2)',\ org.apache.felix.scr; version='[2.0.2,2.0.3)',\ org.eclipse.equinox.metatype; version='[1.4.100,1.4.101)',\ org.osgi.service.metatype; version='[1.3.0,1.3.1)',\ osgi.enroute.examples.eval.simple.provider; version='[1.0.0,1.0.1)' am I missing something? Cheers -Daghan ________________________________ From: osgi-dev-boun...@mail.osgi.org <osgi-dev-boun...@mail.osgi.org> on behalf of Christian Schneider <ch...@die-schneider.net> Sent: Thursday, October 13, 2016 8:38 AM To: OSGi Developer Mail List Subject: Re: [osgi-dev] OSGi enRoute Maven Testers wanted ... Hi Daghan, I think I can answer part of your questions. Christian On 12.10.2016 23:27, Daghan ACAY wrote: > > 2- how is bndtool resolution and hot deploy from eclipse affected? > Should we still resolve bndrun in eclipse? > You can still resolve using the UI. But you can also do a pure maven build. Hot deploy does not work reliably. You have to at least do mvn install on the module you changed and restart your OSGi runtime. > > 3- as a suggestion breaking a build and copy pasting will not work in > ci/cd. I think a more automated solution can be beneficial. > You can use this configuration to make the resolve completely automated <configuration> <resolve>true</resolve> <failOnChanges>false</failOnChanges> </configuration> -- Christian Schneider http://www.liquid-reality.de Liquid Reality - Christian Schneider's Blog - Liquid Reality<http://www.liquid-reality.de/> www.liquid-reality.de Apache karaf is an open source OSGi server developed by the Apache foundation. It provides very convenient management functionality on top of existing OSGi frameworks. Open Source Architect http://www.talend.com [http://upload.wikimedia.org/wikipedia/en/2/21/Talend_logo.png]<http://www.talend.com/> Talend Real-Time Open Source Data Integration Software<http://www.talend.com/> www.talend.com Talend open source integration software products offer real-time solutions for all types of data integration. Learn more about the benefits of Hadoop and Spark. _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev