I use Commons tools both version 2 and 3 together in AEM and so it should work.

That said how are you installing Commons lang and which package does need it.

If you have a custom package that needs commons lang 3 then you need to package 
it with it
if it is not provided from another package.

This is all OSGi behavior but this should be resolvable within.

Cheers - Andy

> On Jan 9, 2017, at 11:35 AM, lancedolan <lance.do...@gmail.com> wrote:
> 
> I have packages (such as composum tools) that depend on apache commons lang
> 3.
> 
> I have other packages (such as most of the sling itself) that depend on
> commons lang version 2.
> 
> There are no Java Package namespacing collisions between these packages -
> they can both exist in the same JVM safely. Version 3 uses
> "org.apache.commons.lang3.*" package. I should be able to install both of
> these packages.
> 
> However, possibly because they have the same artifact ID or something,
> installing version 3 overwrites version 2, meaning I can't have both, and
> thus can't run both the core sling packages and the composum tools. This is
> a deal breaker right now for my Sling P.O.C. project.
> 
> To be clear, the actual commons lang jar version 2 jar file, which is stored
> at /sling/felix/bundle71/version0.0, is deleted and and the version 3 jar
> file is stored at /sling/felix/bundle71/version0.1.
> 
> The only solution I can imagine is to modify the commons-lang bundle with a
> custom artifact ID so that Sling won't consider them the same artifact. That
> would be a hack and cause issues later on.
> 
> I'm positive somebody else has solved this issue? Google search yields
> nothing.
> 
> 
> 
> --
> View this message in context: 
> http://apache-sling.73963.n3.nabble.com/Multiple-Version-of-Commons-Lang-in-OSGI-tp4069450.html
> Sent from the Sling - Users mailing list archive at Nabble.com.

Reply via email to