Hi Stephen, Stephen Connolly wrote:
> On 7 December 2010 10:37, Asmann, Roland <[email protected]> wrote: > >> On 07.12.2010 11:29, Stephen Connolly wrote: >> > On 7 December 2010 10:14, Asmann, Roland <[email protected]> >> wrote: >> > >> > > Hi all, >> > > >> > > I was wondering if anybody ever had this problem... >> > > >> > > I have a customer who is running a machine with a SUN JDK and one >> > > with an IBM JDK. Now, we've noticed there are some differences >> > > between the two, so I thought it would be best to release their >> > > artefacts for both JDKs... Question is, can I do this somehow with >> > > Maven in a single release-cycle or do I need to make separate >> > > releases? >> > > >> > > >> > I would consider running the tests twice and have just one set of >> > artifacts... Otherwise you will have a nightmare of a dependency >> management. >> > >> > Run the tests first with ibm and second with sun/oracle that way you >> > know your artifacts work on both JREs >> > >> OK, so that means I should configure my surefire to run with different >> JDKs? >> Also, with which JDK would you suggest that I run the complete build? >> > > If you use toolchains, it should not matter what JRE you use to run Maven, > the compiler plugin will use the toolchain you specify. > > The question you need to ask yourself is which JDK should the toolchain be > driving, and I cannot answer that... if animal-sniffer says that they are > only using the public JRE api then it does not matter which JDK you use. It does, if the JDK is not compatible. And this is the case for some parts of JDBC 3 vs. 4 (included in Java 6). > And if you have surefire running with both JREs then you should be safe > anyway If your module e.g. implements a JDBC Connector this is simply not possible (see commons-dbcp as precedence). >> > > Also, they currently have a problem in that they need SUN JDK 6 for >> most >> > > project, where one single module MUST be built with SUN JDK 5 >> > > because >> of >> > > a change in some classes. They are currently running the >> compiler-plugin >> > > with a bootclasspath for JDK 5, which isn't beautiful but works. Is >> > > there a way to have a single module use a different JDK from the >> others? >> > > >> > >> > Have a look at toolchains. Google is your friend. Toolchains support >> > has been available for a while now, I know because I helped get it into >> > a >> number >> > of plugins. >> > >> > Another thing you might consider is using >> > animal-sniffer-maven-plu...@mojothat way you can verify that the JRE >> > signatures you use are only public >> > signatures and not internal classes that are not part of the published >> JRE >> > API >> > >> Well, according to the customer they are definitely compiling against >> the API. They say there is a change in some DB drivers or something (at >> least something related to Oracle)... Have to inspect that a little >> further myself though... >> > > Might be the DB driver that is depending on non-public JRE classes Oracle provides two different drivers - one supporting JDBC 3, the other one JDBC 4. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
