If you using java 5 as your JAVA_HOME I would also recommend setting the executable compiler to use.
<executable>path.to.jdk\1.4.2\bin\javac.exe</executable> Whilst <source> and <target> go some way to making sure the language is correct, they won't pick up the fact that java 1.4 doesn't have a certain version of a runtime library. For example you could have happily used <source> and <target> to compile an class that does some XML parsing using java 5 libraries. However when you run the code in a 1.4 environment it'll blow up. Regards, Rich -----Original Message----- From: Graham Leggett [mailto:[EMAIL PROTECTED] Sent: 28 March 2008 19:29 To: Maven Users List Subject: Re: Best practices for java version? david delbecq wrote: > What are the best practice when deploying artifact about java version > used for compiling? I read somewhere that the purpose of maven release > process is to make the build "reproductible", but if that build does not > include aimed compiler, we can't assure a "rebuild" will be fully > compatible with previous build, if the java version changed... Configure the maven-compiler-plugin to specify the specific java version you need for that particular build. This will ensure your future rebuild is repeatable, even with a newer JDK version. Regards, Graham -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]