On Tuesday 27 February 2018 17:58:50 Robert Munteanu wrote: > On Mon, 2018-02-26 at 12:54 +0100, Carsten Ziegeler wrote: > > I'm talking about: > > <!-- https://osgi.org/javadoc/r6/annotation/ --> > > <dependency> > > > > <groupId>org.osgi</groupId> > > <artifactId>org.osgi.annotation.versioning</artifactI > > > > d> > > > > <version>1.0.0</version> > > <scope>provided</scope> > > > > </dependency> > > <!-- > > > > https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotatio > > ns/package-summary.html > > --> > > > > <dependency> > > > > <groupId>org.osgi</groupId> > > > > <artifactId>org.osgi.service.component.annotations</artifactId> > > > > <version>1.3.0</version> > > <scope>provided</scope> > > > > </dependency> > > <!-- > > > > https://osgi.org/javadoc/r6/cmpn/org/osgi/service/metatype/annotation > > s/package-summary.html > > --> > > > > <dependency> > > > > <groupId>org.osgi</groupId> > > > > <artifactId>org.osgi.service.metatype.annotations</artifactId> > > > > <version>1.3.0</version> > > <scope>provided</scope> > > > > </dependency> > > > > Sure, it's a one time effort, but for 100++ modules > > Well, let's try and avoid that :-) > > Could we either: > > 1) Create a profile in the parent pom, activated for bundle projects, > which adds the OSGi dependencies? > > 2) Create a 'non-OSGi' parent POM (A) and an 'OSGi' parent POM (B), > where A is the parent of B. This way we could use the parent POM in > different projects without getting any clashes.
We could use the bundle profile but that "requires" switching to bnd Maven Plugin (or at least placing a file bnd.bnd in the module). Regards, O. > Robert
