sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Munteanu <romb...@apache.org>
Subject Re: bnd warning when importing private packages? (Was: [osgi][wiring] missing unused & undeclared dependency)
Date Thu, 13 Jul 2017 14:11:53 GMT
On Thu, 2017-07-13 at 16:00 +0200, Oliver Lietz wrote:
> On Thursday 13 July 2017 16:21:09 Robert Munteanu wrote:
> > On Thu, 2017-07-13 at 15:19 +0200, Nicolas Peltier wrote:
> > > for bnd i don't know, but Olli pointed me in SLING-7008 to karaf
> > > ITs
> > > that check bundle activations (i'm trying to make fail for now)
> > 
> > ITs are good, agreed. IMO a module build failure would be even
> > better.
> 
> You can run a similar IT in the module itself easily.

Yes, of course. But bnd could do it "for free" :-)

Robert

> 
> Regards,
> O.
> 
> > Robert
> > 
> > > 2017-07-13 15:17 GMT+02:00 Robert Munteanu <rombert@apache.org>:
> > > > Hi,
> > > > 
> > > > On Wed, 2017-07-12 at 16:00 +0000, Stefan Seifert wrote:
> > > > > i've only looked at the code and not tried it myself.
> > > > > 
> > > > > sling pipes is using the package
> > > > > "org.apache.sling.query.util"
> > > > > https://github.com/apache/sling/blob/trunk/contrib/extensions
> > > > > /sli
> > > > > ng-p
> > > > > ipes/src/main/java/org/apache/sling/pipes/internal/PathPipe.j
> > > > > ava#
> > > > > L27
> > > > > 
> > > > > and this package is private, it's not exported:
> > > > > https://github.com/apache/sling/blob/trunk/contrib/extensions
> > > > > /sli
> > > > > ng-q
> > > > > uery/pom.xml#L51
> > > > > 
> > > > > so you need to replace this one class usage. not sure why the
> > > > > problem
> > > > > did not occur before.
> > > > 
> > > > Does anyone know if there is a switch in bnd that we can toggle
> > > > to
> > > > make
> > > > it fail at build time when we import a private package?
> > > > 
> > > > Robert
> > > > 
> > > > > stefan
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Nicolas Peltier [mailto:peltier.nicolas@gmail.com]
> > > > > > Sent: Wednesday, July 12, 2017 3:47 PM
> > > > > > To: dev@sling.apache.org
> > > > > > Subject: [osgi][wiring] missing unused & undeclared
> > > > > > dependency
> > > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > Testing out pipes 1.0.2 release on a famous sling server, I
> > > > > > get
> > > > > > a
> > > > > > weird error at installation time [0]. Referred package
> > > > > > “org.apache.sling.query.util” is not used directly in the
> > > > > > project,
> > > > > > and
> > > > > > “org.apache.sling.query” dependencies / related code hasn’t
> > > > > > change
> > > > > > for
> > > > > > a big while (sling query 3.0.0, the required dependency is
> > > > > > here
> > > > > > &
> > > > > > active)
> > > > > > 
> > > > > > This can be solved by setting that particular package as
> > > > > > optional
> > > > > > in
> > > > > > the bundle description, but I would like to understand what
> > > > > > happens
> > > > > > (and if my release is borked :-( )
> > > > > > 
> > > > > > Nicolas
> > > > > > 
> > > > > > [0] org.osgi.framework.BundleException: Unable to resolve
> > > > > > org.apache.sling.pipes [535](R 535.4): missing requirement
> > > > > > [org.apache.sling.pipes [535](R 535.4)]
> > > > > > osgi.wiring.package;
> > > > > > (osgi.wiring.package=org.apache.sling.query.util)
> > > > > > Unresolved
> > > > > > requirements: [[org.apache.sling.pipes [535](R 535.4)]
> > > > > > osgi.wiring.package;
> > > > > > (osgi.wiring.package=org.apache.sling.query.util)]
> 
> 


Mime
View raw message