Hi Igor,

well I currently don't have a small example ... Flexmojos as the Pluin is a 
pretty large beast and Falcon isn't a trivial example.

But I have been investigating this problem a little more and eventually the 
problems comes from how Flexmojos is built.
Currently the plugin is built using the same mechanisms used in Maven 3.0 and 
hereby relying heavily on Plexus. It seems a guice migration layer had been 
added but the whole thing seems to be built and running in some sort of 
compatability mode. Eventually I should rewrite Flexmojos to guice and more 
modern maven versions (I am having a quite some trouble with Maven versions 
greater than 3.1)

But if you say that even if Maven comes with one version, a plugin should be 
able to work with another, then that's good enough for me, I'll start migrating 
Flexmojos.

Chris


-----Ursprüngliche Nachricht-----
Von: Igor Fedorenko [mailto:i...@ifedorenko.com] 
Gesendet: Freitag, 3. Oktober 2014 21:59
An: dev@maven.apache.org
Betreff: Re: Version conflicts with guava library

What version of Maven do you use? Can you provide a small standalone example 
that demonstrate the problem? Like a sample plugin with a trivial demo project, 
for example.

Generally, each Maven plugin runs in its own classloader with only subset of 
Maven core classes available to it. Guava is not part of that subset and 
plugins should be able to use whatever version of Guava they like.

--
Regards,
Igor

On 2014-10-03, 15:46, Christofer Dutz wrote:
> Hi,
>
> I'm currently working on a plugin for the Apache Flex compiler Falcon. This 
> uses Guava in a version above 15.
> Now maven seems to come with a Guava version ... 0.9.9 for Maven 3.0.x, 
> something about 11 for 3.1 and above.
> The problem is that from version 15 on there was an API change Falcon depends 
> upon. No matter what I tried, I always get an error during runtime that:
>
> Caused by: java.lang.NoSuchMethodError: 
> com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/Ca
> cheLoader;)Lcom/google/common/cache/LoadingCache;
>
> Because till version 15 the return type was Cache and not LoadinCache.
>
> Now to my question ... if I use a library that Maven itself comes with ... is 
> there a way to use that version? Currently it seems I would require my users 
> to update to Maven 3.2.x which will definitely make some pretty unhappy.
>
> Chris
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional 
commands, e-mail: dev-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to