Hi Stephen, >... >you don't want to do what you think you want to do. > >The dependency requirements for JDK 1.5 and JDK 1.6 are different, so you >really want two separate artifacts with two separate pom.xml files. I >would mostly keep everything with target 1.5 and compile using JDK 1.6.
>Use animal-sniffer to ensure that the JDK 1.5 modules only use the JDK 1.5 >run time API, and have the final artifacts that you produce include the >required missing deps from 1.5 that you need (e.g. the backports of the >1.6 concurrency stuff, etc) It's clear, that there are needed separate runtime libraries for compiling and running. I read already about animalsniffer, but it's more a JDK 1.6 project with partly real Java 1.6 code and I'd like to add some JDK 1.5 deployment for compatibility reasons. From my understanding the animalsniffer plugin is just a checker, not more (and not less). I thought about some compatibility module for all other modules, which aggregates build in a manner I need and includes and excludes stuff, but this might confuse a project, which has for instance 10 or more Maven modules, and some of them need to be "compatibilized". My question is rather whether there is a smarter way. Another approach would be some backport translator from a newer Java version to an older one. I know only translators back to Java 1.4, at the moment, as retrotranslator. I would appreciate an example project who practises especially multiple deployments for different target JREs. I'm sure there are some :-) >... >P.S. > >Why do you need to continue to support 1.5 as a dev env. it is >End-Of-Life. If you need to support it as a runtime env, use >animal-sniffer Because commercial projects live their own life. We still have to support even JDK 1.4 and 1.3 projects, it's not my decision, you know what I mean... ;-) René --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
