Giter Site home page Giter Site logo

com.adobe.acs.bundles.retrofit's Introduction

ACS Embedded Retrofit Bundle

This projects makes the Retrofit API available as an OSGi bundle inside a content package suitable for deployment on CQ/AEM.

This package depends upon Google GSON which should be available as-is as it is distributed as an OSGi bundle. For convenience, a content package is available from Adobe Consulting Services' Github Organization.

Logging

By default, Retrofit will log to System.out. To have it logged through the standard Sling/AEM logging system, this bundle includes an adapter for Slf4j which logs under the category name retrofit. To use this adapter, call setLog() during the construction of the RestAdapter:

RestAdapter restAdapter = new RestAdapter.Builder()
      .setEndpoint(API_URL)
      .setLogLevel(LogLevel.FULL)
      .setLog(Slf4jLog.INSTANCE)
      .build();

com.adobe.acs.bundles.retrofit's People

Contributors

justinedelson avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

com.adobe.acs.bundles.retrofit's Issues

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

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.