Skip to content

Retrofit-dependency package com.squareup.okhttp is not being exported #1

@jreece1567

Description

@jreece1567

Looking at the way that the Retrofit-bundle is set up, I see this in the bundle-POM …

        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Export-Package>
                        !retrofit.android,
                        !retrofit.appengine,
                        com.squareup.okhttp.*;version=${okhttp.version},
                        retrofit.*;version=${retrofit.version},
                        com.adobe.acs.bundles.retrofit
                    </Export-Package>
                    <Import-Package>
                        !android.*,
                        !com.google.appengine.*,
                        !org.apache.http*,
                        rx*;resolution:=optional,
                        *
                    </Import-Package>
                    <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency>
                    <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                </instructions>
            </configuration>
        </plugin>

Note that this exports the com.squareup.okhttp package.

However, when I build with an explicit dependency on a class in that package (com.squareup.okhttp), then deploy to AEM, the AEM-bundles-console shows this error (com.squareup.okhttp -- Cannot be resolved):

Imported Packages    com.google.common.collect,version=[15.0,16) from com.google.guava (78)
com.google.gson,version=[2.2,3) from com.google.gson (391)
com.google.gson.annotations,version=[2.2,3) from com.google.gson (391)
com.squareup.okhttp -- Cannot be resolved
javax.xml.parsers from org.apache.felix.framework (0)
org.scribe.builder from com.adobe.granite.scribe (155)
org.scribe.builder.api from com.adobe.granite.scribe (155)
org.scribe.model from com.adobe.granite.scribe (155)
org.scribe.oauth from com.adobe.granite.scribe (155)
org.slf4j,version=[1.6,2) from slf4j.api (14)
org.w3c.dom from org.apache.felix.framework (0)
org.xml.sax from org.apache.felix.framework (0)
retrofit,version=1.6.1 from com.adobe.acs.bundles.retrofit-bundle (394)
retrofit.client,version=1.6.1 from com.adobe.acs.bundles.retrofit-bundle (394)
retrofit.converter,version=1.6.1 from com.adobe.acs.bundles.retrofit-bundle (394)
retrofit.http,version=1.6.1 from com.adobe.acs.bundles.retrofit-bundle (394)
retrofit.mime,version=1.6.1 from com.adobe.acs.bundles.retrofit-bundle (394)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions