felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: [jira] [Commented] (FELIX-5571) Replace JSONParser in Serializer with the new one from utils
Date Tue, 28 Feb 2017 14:02:13 GMT
I disagree.  Semantically, utils dependencies are actually at
scope=compile.   However an osgi bundle should depend on utils with a
scope=provided because it has to embed the packages it needs, so it makes
sense to not convey this dependency.

2017-02-28 14:49 GMT+01:00 Felix Meschberger <fmeschbe@adobe.com>:

> Hi
>
> The problem seems that utils actually declares its own dependencies with
> scope=compile which pollutes the transitive dependency space.
>
> The fix is for utils to declare the dependencies as scope=provided so that
> these dependencies are not transitive.
>
> Regards
> Felix
>
> > Am 28.02.2017 um 11:30 schrieb David Leangen (JIRA) <jira@apache.org>:
> >
> >
> >    [ https://issues.apache.org/jira/browse/FELIX-5571?page=
> com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=15887753#comment-15887753 ]
> >
> > David Leangen commented on FELIX-5571:
> > --------------------------------------
> >
> > It is in the Activator.
> >
> > Actually, I did. I added the depdendency as:
> >
> > {code}
> >        <dependency>
> >            <groupId>org.apache.felix</groupId>
> >            <artifactId>org.apache.felix.utils</artifactId>
> >            <version>1.9.1-SNAPSHOT</version>
> >            <scope>provided</scope>
> >        </dependency>
> > {code}
> >
> > It pulls in the old osgi core transitively, and causes this exception:
> >
> > {code}
> > [ERROR] Failed to execute goal org.apache.maven.plugins:
> maven-compiler-plugin:3.2:compile (default-compile) on project
> org.apache.felix.serializer: Compilation failure: Compilation failure:
> > [ERROR] /Users/dleangen/libs/felix/converter/serializer/src/main/
> java/org/apache/felix/serializer/impl/Activator.java:[35,16] no suitable
> method found for registerService(java.lang.Class<org.osgi.service.
> serializer.Serializer>,org.apache.felix.serializer.impl.
> json.JsonSerializerImpl,java.util.Dictionary<java.lang.
> String,java.lang.Object>)
> > [ERROR] method org.osgi.framework.BundleContext.registerService(
> java.lang.String[],java.lang.Object,java.util.Dictionary) is not
> applicable
> > [ERROR] (argument mismatch; java.lang.Class<org.osgi.service.serializer.Serializer>
> cannot be converted to java.lang.String[])
> > {code}
> >
> > R6 allows a class as a parameter to BundleContext.registerService(),
> but R4 does not. I don't think it would be the right call to revert to the
> older version of this method call.
> >
> >> Replace JSONParser in Serializer with the new one from utils
> >> ------------------------------------------------------------
> >>
> >>                Key: FELIX-5571
> >>                URL: https://issues.apache.org/jira/browse/FELIX-5571
> >>            Project: Felix
> >>         Issue Type: Bug
> >>         Components: Converter
> >>           Reporter: David Leangen
> >>           Assignee: David Leangen
> >>
> >> I can do this if there are no objections.
> >
> >
> >
> > --
> > This message was sent by Atlassian JIRA
> > (v6.3.15#6346)
>
>


-- 
------------------------
Guillaume Nodet

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message