[ 
https://issues.apache.org/jira/browse/SLING-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825128#comment-13825128
 ] 

Chetan Mehrotra commented on SLING-3243:
----------------------------------------

For bundle which wish to use the slf4j api 1.7.5 and make use of new var args 
support and still be usable on Sling systems which packages older version of 
Slf4j API jar say 1.6.4 they can do so by following steps

1. Update the api version in pom dependency

{code:xml}
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.5</version>
      <scope>provided</scope>
    </dependency>
   ...
</dependency>
{code}

2. Add {{Import-Package}} instruction

{code:xml}
<build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            ...
            <Import-Package>
              org.slf4j;version="[1.5,2)",
              *
            </Import-Package>
          </instructions>
        </configuration>
      </plugin>
      ...
   </plugins>
</build>
{code}

This would ensure that {{org.slf4j}} package version would be imported with 
version range \[1.5,2). It would allow the bundle to be deployed on older Sling 
system

> Update the Slf4j API bundle to 1.7.5
> ------------------------------------
>
>                 Key: SLING-3243
>                 URL: https://issues.apache.org/jira/browse/SLING-3243
>             Project: Sling
>          Issue Type: Task
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>
> We should update the Slf4j API bundle and other slf4j bundle to there latest 
> release of 1.7.5 [1]. 
> One problem with Slf4j is that it exports package with version matching the 
> jar version. So with 1.7.5 the packages are also exported at 1.7.5. So it 
> might pose problem for bundle which import with smaller range like [1.6.0,1.7)
> See http://markmail.org/thread/vu4uoiln4z4f3mms



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to