You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alessandro Benedetti <ab...@apache.org> on 2015/02/19 14:38:04 UTC

[Apache DS] Slf4j Dependency

Hi developers,
Playing with maven dependencies and a project I had a lot of troubles
because using this maven dep :

<dependency>
 <groupId>org.apache.directory.server</groupId>
 <artifactId>apacheds-all</artifactId>
 <version>1.5.5</version>
 <type>jar</type>
 <scope>compile</scope>
</dependency>

It was implicitly overwriting my class loading for Slf4j classes.

This was really weird so analysing the jar, we discovered that
apaches-all contains hardcoded some Slf4j classes ...

Upgrading to 2.0 partially solved the issue as we got a newer version
of Slf4j hardcoded that was not conflicting anymore with the rest of
the project.

So my question:

Are we doing something wrong using that del ?

Why is Slf4j hardcoded inside that ?

Cheers

Re: [Apache DS] Slf4j Dependency

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 19/02/15 19:18, Alessandro Benedetti a écrit :
> The problem seems to be that the Slf4j del is hardcoded in apaches-all.
> Not included with maven.
> Setting the scope to provided ( to what ? apaches-all ? slf4j-api) doesn't
> seem an option to me.

Right.

Looking at apacheds-all, it's a black box that is totally useless...

We should have just included all teh apacheds dependencies, excluding
all the others.

I see no other option but adding all the needed dependencies atm. We
will fix the apacheds-all so that it does not import the external
dependencies.




Re: [Apache DS] Slf4j Dependency

Posted by Alessandro Benedetti <be...@gmail.com>.
The problem seems to be that the Slf4j del is hardcoded in apaches-all.
Not included with maven.
Setting the scope to provided ( to what ? apaches-all ? slf4j-api) doesn't
seem an option to me.

Cheers

2015-02-19 14:20 GMT+00:00 Emmanuel Lécharny <el...@gmail.com>:

> Le 19/02/15 14:38, Alessandro Benedetti a écrit :
> > Hi developers,
> > Playing with maven dependencies and a project I had a lot of troubles
> > because using this maven dep :
> >
> > <dependency>
> >  <groupId>org.apache.directory.server</groupId>
> >  <artifactId>apacheds-all</artifactId>
> >  <version>1.5.5</version>
> >  <type>jar</type>
> >  <scope>compile</scope>
> > </dependency>
> >
> > It was implicitly overwriting my class loading for Slf4j classes.
>
> Have you tried to use <scope>provided</scope> instead ?
>
> Using the scope compile, which is the default btw, will pull all the
> transitive dependencies from apacheds-all.
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Re: [Apache DS] Slf4j Dependency

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 19/02/15 14:38, Alessandro Benedetti a écrit :
> Hi developers,
> Playing with maven dependencies and a project I had a lot of troubles
> because using this maven dep :
>
> <dependency>
>  <groupId>org.apache.directory.server</groupId>
>  <artifactId>apacheds-all</artifactId>
>  <version>1.5.5</version>
>  <type>jar</type>
>  <scope>compile</scope>
> </dependency>
>
> It was implicitly overwriting my class loading for Slf4j classes.

Have you tried to use <scope>provided</scope> instead ?

Using the scope compile, which is the default btw, will pull all the
transitive dependencies from apacheds-all.