Hi Gilles, Gilles wrote:
> Hi. > > Suppose that > commons-rng-core-1.0.jar > depends on JDK 1.6. > > And that we wish to offer utilities (e.g. random strings) and other > syntactic sugar (such as Java 8 streams) in > commons-rng-utils-1.0.jar > that would depend on JDK 1.8. > > Is it possible? Yes. Have a look at XStream (https://github.com/x-stream/xstream/blob/master/xstream/pom.xml), it already does this (since years), currently to support lambda expressions. It declarers simply a second compiler execution. Note, there's a bug in Maven that forces you to define as many excludes in the second execution as in the first one. There are some minor drawbacks though. Android users fail to use the jar, because there's no support for Java 8. App servers running with Java 7 may fail if they scan the libraries in the classpath for annotations (e.g. http://x-stream.github.io/faq.html#Compatibility_webSphere_8). Cheers, Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org