Version conflicts with guava library
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/CacheLoader;)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
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/CacheLoader;)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
AW: Version conflicts with guava library
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
I'd like to release Maven Compiler Plugin v3.2
I've just fixed MCOMPILER-224, MCOMPILER-157, and (by extension) MCOMPILER-159. Are there any objections to me calling the vote to release 3.2 now? I was hoping to test the waters before it involves backing out a tag to call things back. Thanks, -john -- John Casey --- GitHub: https://github.com/jdcasey/ Twitter: http://twitter.com/buildchimp - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Version conflicts with guava library
Classloader isolation is not specific to Guice. Something must be going on if you get incompatible guava version when using maven 3.0+. This is why I recommend setting up a standalone example to investigate what it is. On October 3, 2014 4:57:57 PM EDT, Christofer Dutz christofer.d...@c-ware.de wrote: 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 -- Sent from my Android device with K-9 Mail. Please excuse my brevity. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org