We would manage this in our CI server and indeed control what JAVA_HOME is set to for different workflows. We'd further use Maven profiles to toggle the setting within Maven for things like compiler settings. Then one code change could trigger two builds in parallel targeting different JDK's.
________________________________ Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time, 600 times a day > -----Original Message----- > From: Adva Rotstein-Hayun [mailto:[email protected]] > Sent: Monday, May 23, 2011 10:15 AM > To: [email protected] > Subject: working with several java version with maven > > Hi, > I have several projects that compile with java 5. > There is 1 project I would like to compile with java 6. > I added to that project pom the source and target attributes, > however my JAVA_HOME environment variable is set to java 5. > How can I tell maven where is my java 6 home? > I can not change my JAVA_HOME on each run, I would like it to > be automatically. > Can I define it in a pom.xml? > > Adva > > This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
